-
Notifications
You must be signed in to change notification settings - Fork 13
support unit test with picotest. This unit test runs when the libtlp is compiled. #3
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
base: master
Are you sure you want to change the base?
Conversation
|
Please do not put source files on the top of repository. Please make a directory for unit tests, and put unit test codes into the directory. Unfortunately, |
unit_test.c
Outdated
| result_length = tlp_calculate_length(0x0, 0); | ||
| ok(result_length == 0); | ||
|
|
||
| result_length = tlp_calculate_length(0x1, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test fails. the correct behavior is 0?
unit_test.c
Outdated
| ok(result_length == 1023); | ||
|
|
||
| result_length = tlp_calculate_length(0x0, 4093); | ||
| ok(result_length == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These four tests also fail. result_length must be 1024.
No description provided.