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

TestUtf8LimitStrSize fails on windows build #36

Open
hbivens opened this issue Sep 9, 2024 · 1 comment
Open

TestUtf8LimitStrSize fails on windows build #36

hbivens opened this issue Sep 9, 2024 · 1 comment

Comments

@hbivens
Copy link
Collaborator

hbivens commented Sep 9, 2024

Test project C:/Projects/code/SpecUtils/out/build/x64-Debug
    Start 8: TestUtf8LimitStrSize
1/1 Test #8: TestUtf8LimitStrSize .............***Failed    0.18 sec
[doctest] doctest version is "2.4.11"
[doctest] run with "--help" for options
===============================================================================
C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(41):
TEST CASE:  Test utf8 limit str size

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(85): ERROR: CHECK_EQ( teststr, "" ) is NOT correct!
  values: CHECK_EQ( â,  )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(89): ERROR: CHECK_EQ( teststr, u8"ⓧ" ) is NOT correct!
  values: CHECK_EQ( â, ⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(97): ERROR: CHECK_EQ( teststr, u8"ⓧ" ) is NOT correct!
  values: CHECK_EQ( â, ⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(101): ERROR: CHECK_EQ( teststr, u8"ⓧⓧ" ) is NOT correct!
  values: CHECK_EQ( â“, ⓧⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(105): ERROR: CHECK_EQ( teststr, u8"ⓧⓧ" ) is NOT correct!
  values: CHECK_EQ( â“, ⓧⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(109): ERROR: CHECK_EQ( teststr, u8"ⓧⓧa" ) is NOT correct!
  values: CHECK_EQ( ⓧ, ⓧⓧa )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(114): ERROR: CHECK_EQ( teststr, u8"aaⓧ" ) is NOT correct!
  values: CHECK_EQ( aaâ, aaⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(118): ERROR: CHECK_EQ( teststr, u8"aaⓧ" ) is NOT correct!
  values: CHECK_EQ( aaâ, aaⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(122): ERROR: CHECK_EQ( teststr, u8"aaⓧ" ) is NOT correct!
  values: CHECK_EQ( aaâ“, aaⓧ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(127): ERROR: CHECK_EQ( teststr, u8"aõ" ) is NOT correct!
  values: CHECK_EQ( aÃ, aõ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(131): ERROR: CHECK_EQ( teststr, u8"õa" ) is NOT correct!
  values: CHECK_EQ( Ã, õa )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(135): ERROR: CHECK_EQ( teststr, u8"õ" ) is NOT correct!
  values: CHECK_EQ( Ã, õ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(139): ERROR: CHECK_EQ( teststr, u8"õ" ) is NOT correct!
  values: CHECK_EQ( Ã, õ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(147): ERROR: CHECK_EQ( teststr, u8"÷" ) is NOT correct!
  values: CHECK_EQ( Ã, ÷ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(151): ERROR: CHECK_EQ( teststr, u8"÷" ) is NOT correct!
  values: CHECK_EQ( Ã, ÷ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(155): ERROR: CHECK_EQ( teststr, u8"÷õ" ) is NOT correct!
  values: CHECK_EQ( ÷, ÷õ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(159): ERROR: CHECK_EQ( teststr, u8"÷õ" ) is NOT correct!
  values: CHECK_EQ( ÷, ÷õ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(163): ERROR: CHECK_EQ( teststr, u8"÷aõ" ) is NOT correct!
  values: CHECK_EQ( ÷a, ÷aõ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(167): ERROR: CHECK_EQ( teststr, u8"÷aõ" ) is NOT correct!
  values: CHECK_EQ( ÷a, ÷aõ )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(171): ERROR: CHECK_EQ( teststr, u8"÷a" ) is NOT correct!
  values: CHECK_EQ( Ã, ÷a )

C:\Projects\code\SpecUtils\unit_tests\test_utf8_limit_str_size.cpp(175): ERROR: CHECK_EQ( teststr, u8"÷" ) is NOT correct!
  values: CHECK_EQ( Ã, ÷ )
@wcjohns
Copy link
Collaborator

wcjohns commented Sep 9, 2024

I thought commit 3c3bf8c should have fixed this - for me the tests failed when Windows didn't interpret the source file as UTF-8. I added a BOM to the file, and then it would pass. It currently seems to pass on GitHub Actions for Windows, and on my machine - is it possible that your source code editor is changing the text encoding?
Or is there a better way to force UTF-8 encoding of the source file?

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

2 participants