diff options
Diffstat (limited to 'test/testutils/domtscondition.c')
-rw-r--r-- | test/testutils/domtscondition.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/test/testutils/domtscondition.c b/test/testutils/domtscondition.c new file mode 100644 index 0000000..39f6c68 --- /dev/null +++ b/test/testutils/domtscondition.c @@ -0,0 +1,32 @@ +/* + * This file is part of libdom test suite. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com> + */ + +#include <stdbool.h> + +/** + * Just simple functions which meet the needs of DOMTS conditions + */ + +bool less(int excepted, int actual) +{ + return actual < excepted; +} + +bool less_or_equals(int excepted, int actual) +{ + return actual <= excepted; +} + +bool greater(int excepted, int actual) +{ + return actual > excepted; +} + +bool greater_or_equals(int excepted, int actual) +{ + return actual >= excepted; +} |