Commit Graph

10 Commits

Author SHA1 Message Date
Tibor Nagy efd6947d8e tests: Fix function-like macros
Turns the results of these macros from compound to regular statements using the old `do { ... } while(0)` trick. Must have for function-like macros.
2019-02-25 14:13:02 +01:00
Tibor Nagy 9a0ea6ff34 tests: More refactoring, add helper header to every test, override exit for better error reporting 2019-02-21 21:13:28 +01:00
Tibor Nagy 4381bb2a22 tests: Remove redundant return statements
When the execution reaches the end of the main functions, they implicitly return a successful status.
2019-02-20 21:09:03 +01:00
Tibor Nagy ff874c87d7 tests: Fix function signatures 2019-02-20 19:27:18 +01:00
Tibor Nagy 1eb22b2cb2 ctype: Add tests for toascii, tolower, toupper 2019-02-19 20:54:05 +01:00
Tibor Nagy 5fac72298f ctype: Fix iscntrl, isgraph, ispunct, make tests exhaustive
iscntrl: Didn't handle the EOF macro correctly
isgraph: Didn't handle '~' (tilde) correctly
ispunct: Several issues
2019-02-19 19:53:54 +01:00
SamwiseFilmore 46fe488e05 Merge branch 'master' into master 2018-03-08 18:31:14 -06:00
MggMuggins 6ced871d9a ctype: tests and reorganize
Wrote tests for the functions implemented in 40558b2 and maybe made that
test a little more comprehensible.

Also made sure that fmt.sh and test.sh were being executed by bash all
the time (compatibility with other shells).
2018-03-08 18:25:11 -06:00
Jeremy Soller 07c3ce02be Fix build 2018-03-08 15:52:48 -07:00
Dan Robertson ec288a1b53 Add ctype functions and atoi/atol
Add ctype functions
  - isalnum
  - isalpha
  - isascii
  - isdigit
  - islower
  - isspace
  - isupper
Add stdlib functions
  - atoi
  - atol
Fix some warnings
Make a fmt run
2018-03-08 05:26:40 +00:00