Commit graph

424 commits

Author SHA1 Message Date
Colin Benner
f2c22983b9 Add test for eval_outer_expr_unit_cond 2018-11-15 21:51:51 +01:00
Colin Benner
a99399260d More tests for eval's helper functions 2018-11-15 21:51:51 +01:00
Colin Benner
1ce0f1c392 Test some functions 2018-11-15 21:51:51 +01:00
Colin Benner
36db08836d Test more cases in eval() 2018-11-15 21:51:51 +01:00
Colin Benner
6a1d250694 Test try_decode failure case 2018-11-15 21:51:51 +01:00
Colin Benner
8f6302adf0 Fix duplicate test name 2018-11-15 21:51:51 +01:00
Colin Benner
8e61076002 Test definition with doc 2018-11-15 21:51:51 +01:00
Colin Benner
43a12f96e2 Test chemical formulas containing larger numbers 2018-11-15 21:51:51 +01:00
Colin Benner
0f37dbf29d Test formula.rs 2018-11-15 21:51:51 +01:00
Colin Benner
b70fdab6b6 Test conversion to list 2018-11-15 21:51:51 +01:00
Colin Benner
9248d49fdb Make sure there is no call on the right hand side 2018-11-15 21:51:51 +01:00
Colin Benner
2bd02fd7a7 Test try_decode 2018-11-15 21:51:50 +01:00
Colin Benner
e86ae5ab52 Test 'now' and date arithmetic 2018-11-15 21:51:50 +01:00
Colin Benner
9e10c6dc09 Test another error case 2018-11-15 21:51:50 +01:00
Colin Benner
2468aa2e39 Test timezone conversion 2018-11-15 21:51:50 +01:00
Colin Benner
94e2193287 Add tests for Unicode escape sequences 2018-11-15 21:51:50 +01:00
Colin Benner
dc82d2db5c Test escape sequences between single quotes 2018-11-15 21:51:50 +01:00
Colin Benner
679c41caf9 Test unsupported base 2018-11-15 21:51:50 +01:00
Colin Benner
63a1d9cb85 Add more tests for text_query 2018-11-15 21:51:50 +01:00
Colin Benner
7f1d07e85e Test fractional seconds 2018-11-15 21:51:50 +01:00
Colin Benner
f07b33c56b Another test for the date and comment parsers 2018-11-15 21:51:50 +01:00
Colin Benner
2a19addc0b Add a few more tests for text_query.rs 2018-11-15 21:51:50 +01:00
Colin Benner
9ae738ad15 Properly handle comments: skip closing slash
When we reach the end of an inline comment, we need to call self.0.next().
Otherwise, the closing slash is treated as a separate token.

Ignore `Token::Comment` in `parse_term`, do not return an error.

Add regression test.
2018-11-15 21:51:25 +01:00
Colin Benner
4f8d044099 Start testing input in different bases 2018-11-15 18:55:45 +01:00
Colin Benner
b25de640bd Add tests for binary function error cases 2018-11-15 18:55:45 +01:00
Colin Benner
f2f57612dc Test error case in eval() 2018-11-15 18:55:45 +01:00
Colin Benner
ff8f243177 Test another case in eval() 2018-11-15 18:55:45 +01:00
Colin Benner
fdcffecddc Add test for eval_outer_expr_unit_cond 2018-11-15 18:55:45 +01:00
Colin Benner
68f2db7055 More tests for eval's helper functions 2018-11-15 18:55:45 +01:00
Colin Benner
79f2575245 Test some functions 2018-11-15 18:55:45 +01:00
Colin Benner
592b7e9d41 Test more cases in eval() 2018-11-15 18:55:45 +01:00
Colin Benner
7787156d88 Test parse_date on 24h and plain seconds 2018-11-15 18:55:45 +01:00
Colin Benner
cbc5c89670 Test parsing timezone names 2018-11-15 18:55:45 +01:00
Colin Benner
1f9fda92fb Test weekday parser 2018-11-15 18:55:45 +01:00
Colin Benner
64f72fe743 Test parsing offsets 2018-11-15 18:55:45 +01:00
Colin Benner
c203481a08 More parse_date tests 2018-11-15 18:55:45 +01:00
Colin Benner
a6d044511d More parse_date tests 2018-11-15 18:55:45 +01:00
Colin Benner
0667110c2e Try deleting test executables before building 2018-11-15 18:55:45 +01:00
Colin Benner
b3670b8559 Add test for a bunch of cases in parse_date 2018-11-15 18:55:45 +01:00
Colin Benner
4474c376b0 Add another test case in date.rs 2018-11-15 18:55:45 +01:00
Colin Benner
00dcdd4f52 Simplify tests in date.rs 2018-11-15 18:55:45 +01:00
Colin Benner
4437500941 Run date parser on "+123" 2018-11-15 18:55:45 +01:00
Colin Benner
f678261856 Add first test for date parser 2018-11-15 18:55:45 +01:00
Colin Benner
e92d038750 Test escaped quotes in gnu_units 2018-11-15 18:55:45 +01:00
Colin Benner
a5ccdaf1b9 Test floats with leading dots in gnu_units 2018-11-15 18:55:45 +01:00
Colin Benner
30fcab3528 Test escape handling in gnu_units 2018-11-15 18:55:45 +01:00
Colin Benner
999f59bc78 Remove test executables after measuring coverage 2018-11-15 18:55:45 +01:00
Colin Benner
51df05702f Add more unit tests for gnu_units 2018-11-15 18:55:45 +01:00
Colin Benner
9e0bd52e2e Move duplicate code out of tests 2018-11-15 18:55:45 +01:00
Colin Benner
9f742ffc3d Fix missing brackets test 2018-11-15 18:55:45 +01:00