Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brittle unum formatting tests #203

Open
filmil opened this issue Apr 23, 2021 · 1 comment
Open

Brittle unum formatting tests #203

filmil opened this issue Apr 23, 2021 · 1 comment

Comments

@filmil
Copy link
Member

filmil commented Apr 23, 2021

For some reason this started not when I upgraded to ICU 69.1 but a few runs later.
Disabling the specific brittle test for now.

   Compiling rust_icu_unum v0.5.0 (/src/rust_icu/rust_icu_unum)                                                                         
    Finished test [unoptimized + debuginfo] target(s) in 1.30s                                                                          
     Running unittests (/src/rust_icu/target/debug/deps/rust_icu_unum-ac8d5277297f6bad)                                                 
                                                                                                                                        
running 9 tests                                                                                                                         
test tests::format_decimal_pattern_ustring ... ok                                                                                       
test tests::format_decimal ... ok                                                                                                       
test tests::format_double_currency ... ok                                                                                               
test tests::test_available ... ok                                   
test tests::format_style_ustring ... ok                                                                                                 
test tests::format_double_with_fields ... ok                                                                                            
test tests::format_and_parse_uformattable ... ok                                                                                        
test tests::format_decimal_rulebased_ustring ... ok                                                                                     
test tests::pattern ... FAILED                                                                                                          
                                                                                                                                        
failures:                                                                                                                               
                                                                                                                                        
---- tests::pattern stdout ----                                                                                                         
thread 'tests::pattern' panicked at 'assertion failed: `(left == right)`                                                                
  left: `"#,##1.###"`,                                                                                                                  
 right: `"#,##0.###"`: in test: TestCase { source_locale: "sr-RS", is_localized: false, style: UNUM_DECIMAL, expected: "#,##1.###" }', rust_icu_unum/src/lib.rs:1020:13
stack backtrace:                                                                                                                        
   0:     0x55b9fce63470 - std::backtrace_rs::backtrace::libunwind::trace::hdcf4f90f85129e83                                            
                               at /rustc/7f4afdf0255600306bf67432da722c7b5d2cbf82/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x55b9fce63470 - std::backtrace_rs::backtrace::trace_unsynchronized::h2669e30cb82f6732                                        
                               at /rustc/7f4afdf0255600306bf67432da722c7b5d2cbf82/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x55b9fce63470 - std::sys_common::backtrace::_print_fmt::hfbda19e17f6db318
                               at /rustc/7f4afdf0255600306bf67432da722c7b5d2cbf82/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x55b9fce63470 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1a8751bf59281272
                               at /rustc/7f4afdf0255600306bf67432da722c7b5d2cbf82/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x55b9fce8647f - core::fmt::write::h7aa6cd0067dca82a                                                                          
                               at /rustc/7f4afdf0255600306bf67432da722c7b5d2cbf82/library/core/src/fmt/mod.rs:1094:17 
   5:     0x55b9fce60385 - std::io::Write::write_fmt::he6661e7347cae026                            
                               at /rustc/7f4afdf0255600306bf67432da722c7b5d2cbf82/library/std/src/io/mod.rs:1580:15     
   6:     0x55b9fce6560b - std::sys_common::backtrace::_print::h551e9ec8a9fa8106                                      
...
filmil added a commit to filmil/rust_icu that referenced this issue Apr 23, 2021
Handles a few hopefully minor bitrot items that I noticed while adding
support for ICU 96 in issue google#198.

Pulling that rug uncovered issue google#203 too.
Fixed: google#202
filmil added a commit that referenced this issue Apr 23, 2021
Handles a few hopefully minor bitrot items that I noticed while adding
support for ICU 96 in issue #198.

Pulling that rug uncovered issue #203 too.
Fixed: #202
@filmil
Copy link
Member Author

filmil commented Dec 5, 2021

For posterity, I think I know how this comes about. The CLDR data for sr-RS aren't exactly very complete, and they get updated with every major release. This means whenever these rules get more precise, some of the tests necessarily break.

I was looking at updating them, with specific focus on the spell-out of numbers, but there's quite a bit of work to get it up to snuff. I'll check whether there's someone who could be able to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant