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

unittesting failed #2

Open
LukyGuyLucky opened this issue Dec 19, 2024 · 5 comments
Open

unittesting failed #2

LukyGuyLucky opened this issue Dec 19, 2024 · 5 comments

Comments

@LukyGuyLucky
Copy link

I am trying to get familar with this library under win10 64 bit ,but failed to pass unittest.So was I missing something?

Thanks in advance.

Launching build\testrun.exe
------------------ TESTS ------------------
Testing xml_test::xml_file_parsing1 .. [error]

 Error: Assert violation
  - in xml_file_parsing1 main.c3:14.

Testing xml_test::xml_file_parsing2 .. [error]

 Error: Unexpected fault 'OUT_OF_MEMORY' was unwrapped!
  - in ensure_capacity mem_allocator.c3:85.

Testing xml_test::xml_file_parsing3 .. [error]

 Error: Assert violation
  - in xml_file_parsing3 main.c3:53.


3 tests run.

Test Result: FAILED. 0 passed, 3 failed.
Program completed with exit code 1.
@tonis2
Copy link
Owner

tonis2 commented Dec 21, 2024

Will try to check under Windows, works fine currently on linux, so some windows oddity happening here

@tonis2
Copy link
Owner

tonis2 commented Dec 23, 2024

@LukyGuyLucky
It's fixed now on Windows, please give it a try

@LukyGuyLucky
Copy link
Author

Thank you for taking care of this.

Sorry,it failed as the same as previous one does.

@tonis2
Copy link
Owner

tonis2 commented Dec 24, 2024

@LukyGuyLucky
Okay, I tried to increase the buffer capacity at here
https://github.com/tonis2/xml.c3/blob/main/parser.c3#L183

Can you try to pull and run unit tests again if you get a chance ?

I might need to use dynamic allocator there, but not sure if this is the error causation, cause it somehow doesn't pop-up at my machine :/

@LukyGuyLucky
Copy link
Author

Thank you.

I just tested and got below result:

Launching build\testrun.exe
------------------ TESTS ------------------
Testing xml_test::xml_file_parsing1 .. [error]

 Error: Assert violation
  - in xml_file_parsing1 test.c3:14.

Testing xml_test::xml_file_parsing2 .. [error]

 Error: Unexpected fault 'OUT_OF_MEMORY' was unwrapped!
  - in ensure_capacity mem_allocator.c3:85.

Testing xml_test::xml_file_parsing3 .. [error]

 Error: Assert violation
  - in xml_file_parsing3 test.c3:54.


3 tests run.

Test Result: FAILED. 0 passed, 3 failed.
Program completed with exit code 1.

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