-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into anywany-tests
# Conflicts: # .github/workflows/ci.yml # testlib.h # tests/scripts/test-ref
- Loading branch information
Showing
10 changed files
with
376 additions
and
297 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,53 @@ | ||
FAIL Opts: index '1' is out of range [0,1) | ||
FAIL Opts: integer overflow: expected integer but '3e6' found | ||
FAIL Opts: index '-1' is out of range [0,14) | ||
FAIL Opts: opt by index '2': expected bool true/false or 0/1 but '-2147483648' found | ||
FAIL Opts: expected integer but '-f1' found | ||
FAIL Opts: index '14' is out of range [0,14) | ||
FAIL Opts: expected non-negative integer but '-2147483648' found | ||
FAIL Opts: unknown key 'test-count' | ||
FAIL Opts: unknown key 'sum-n' | ||
FAIL Opts: unused key 'min-val' | ||
FAIL Opts: unused key 'max-val' | ||
FAIL Opts: unused key 'min-length' | ||
FAIL Opts: unused key 'bias-value' | ||
FAIL Unexpected end of file - token expected (based on ) | ||
FAIL Unexpected end of file - token expected (based on ) | ||
FAIL Integer parameter [name=n] equals to 1, violates the range [0, 0] (based on ) | ||
FAIL Token parameter [name=n] equals to "abacaba", doesn't correspond to pattern "[abc]{6}" (based on ) | ||
FAIL Token parameter [name=n] equals to "abacab", doesn't correspond to pattern "a|test|abacaba|ok|abac" (based on ) | ||
FAIL Token parameter [name=n] equals to "abacabaa", doesn't correspond to pattern "a|test|abacaba|ok|abac" (based on ) | ||
FAIL Token parameter [name=n] equals to "abacaba!", doesn't correspond to pattern "a|test|abacaba|ok|abac" (based on ) | ||
FAIL Integer element a[4] equals to 4, violates the range [1, 3] (based on ) | ||
FAIL Opts: index '1' is out of range [0,1) | ||
FAIL Opts: integer overflow: expected integer but '3e6' found | ||
FAIL Opts: index '-1' is out of range [0,14) | ||
FAIL Opts: opt by index '2': expected bool true/false or 0/1 but '-2147483648' found | ||
FAIL Opts: expected integer but '-f1' found | ||
FAIL Opts: index '14' is out of range [0,14) | ||
FAIL Opts: expected non-negative integer but '-2147483648' found | ||
FAIL Opts: unknown key 'test-count' | ||
FAIL Opts: unknown key 'sum-n' | ||
FAIL Opts: unused key 'min-val' | ||
FAIL Opts: unused key 'max-val' | ||
FAIL Opts: unused key 'min-length' | ||
FAIL Opts: unused key 'bias-value' | ||
FAIL Unexpected end of file - token expected (based on ) | ||
FAIL Unexpected end of file - token expected (based on ) | ||
FAIL Integer parameter [name=n] equals to 1, violates the range [0, 0] (based on ) | ||
FAIL Token parameter [name=n] equals to "abacaba", doesn't correspond to pattern "[abc]{6}" (based on ) | ||
FAIL Token parameter [name=n] equals to "abacab", doesn't correspond to pattern "a|test|abacaba|ok|abac" (based on ) | ||
FAIL Token parameter [name=n] equals to "abacabaa", doesn't correspond to pattern "a|test|abacaba|ok|abac" (based on ) | ||
FAIL Token parameter [name=n] equals to "abacaba!", doesn't correspond to pattern "a|test|abacaba|ok|abac" (based on ) | ||
FAIL Integer element a[4] equals to 4, violates the range [1, 3] (based on ) | ||
FAIL Expected integer, but "" found () | ||
FAIL Expected integer, but "-" found () | ||
FAIL Expected integer, but "+" found () | ||
FAIL Expected integer, but "00" found () | ||
FAIL Expected integer, but "0123" found () | ||
FAIL Expected integer, but "+123" found () | ||
FAIL Expected integer, but "09223372036854775807" found () | ||
FAIL Expected integer, but "9223372036854775808" found () | ||
FAIL Expected integer, but "-09223372036854775808" found () | ||
FAIL Expected integer, but "-9223372036854775809" found () | ||
FAIL Expected integer, but "1 " found () | ||
FAIL Expected integer, but " 1" found () | ||
FAIL Expected integer, but "1 2" found () | ||
FAIL Expected integer, but "-0" found () | ||
FAIL Expected integer, but "--0" found () | ||
FAIL Expected integer, but "123-" found () | ||
FAIL Expected unsigned integer, but "" found () | ||
FAIL Expected unsigned integer, but "-" found () | ||
FAIL Expected unsigned integer, but "-1" found () | ||
FAIL Expected unsigned integer, but "+" found () | ||
FAIL Expected unsigned integer, but "00" found () | ||
FAIL Expected unsigned integer, but "0123" found () | ||
FAIL Expected unsigned integer, but "+123" found () | ||
FAIL Expected unsigned integer, but "18446744073709551616" found () | ||
FAIL Expected unsigned integer, but "18446744073709551617" found () | ||
FAIL Expected unsigned integer, but "36893488147419103232" found () | ||
FAIL Expected unsigned integer, but "1 " found () | ||
FAIL Expected unsigned integer, but " 1" found () | ||
FAIL Expected unsigned integer, but "1 2" found () | ||
FAIL Expected unsigned integer, but "-0" found () | ||
FAIL Expected unsigned integer, but "--0" found () | ||
FAIL Expected unsigned integer, but "-00" found () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
Running test 'join' OK | ||
Running test 'split' OK | ||
Running test 'tokenize' OK | ||
Running test 'opts' OK | ||
Running test 'instream' OK | ||
Running test 'pattern' OK | ||
|
||
SUCCESS 6 tests passed. | ||
Running test 'join' OK | ||
Running test 'split' OK | ||
Running test 'tokenize' OK | ||
Running test 'opts' OK | ||
Running test 'instream' OK | ||
Running test 'pattern' OK | ||
Running test 'stringToLongLong' OK | ||
Running test 'stringToUnsignedLongLong' OK | ||
|
||
SUCCESS 8 tests passed. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
TEST(stringToLongLong) { | ||
ensure(stringToLongLong(inf, "1234567891") == 1234567891LL); | ||
ensure(stringToLongLong(inf, "-47292722921111") == -47292722921111LL); | ||
ensure(stringToLongLong(inf, "0") == 0LL); | ||
ensure(stringToLongLong(inf, "9223372036854775807") == 9223372036854775807LL); | ||
ensure(stringToLongLong(inf, "-9223372036854775808") == -9223372036854775807LL - 1LL); | ||
ensure_exit(3, [](){stringToLongLong(inf, "");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "-");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "+");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "00");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "0123");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "+123");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "09223372036854775807");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "9223372036854775808");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "-09223372036854775808");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "-9223372036854775809");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "1 ");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, " 1");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "1 2");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "-0");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "--0");}); | ||
ensure_exit(3, [](){stringToLongLong(inf, "123-");}); | ||
} |
24 changes: 24 additions & 0 deletions
24
tests/test-004_use-test.h/tests/test-stringToUnsignedLongLong.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
TEST(stringToUnsignedLongLong) { | ||
ensure(stringToUnsignedLongLong(inf, "123") == 123ULL); | ||
ensure(stringToUnsignedLongLong(inf, "0") == 0ULL); | ||
ensure(stringToUnsignedLongLong(inf, "7") == 7ULL); | ||
ensure(stringToUnsignedLongLong(inf, "18446744073709551615") == 18446744073709551615ULL); | ||
ensure(stringToUnsignedLongLong(inf, "9876543216540001000") == 9876543216540001000ULL); | ||
|
||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "-");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "-1");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "+");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "00");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "0123");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "+123");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "18446744073709551616");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "18446744073709551617");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "36893488147419103232");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "1 ");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, " 1");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "1 2");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "-0");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "--0");}); | ||
ensure_exit(3, [](){stringToUnsignedLongLong(inf, "-00");}); | ||
} |