From d39ab121f80ec57dfd0ea75d17a2643bd0eb1e66 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Mon, 12 Dec 2016 22:33:06 -0500 Subject: [PATCH] assertX iterate --- c/dsl/function_manager.c | 26 ++++++++++++++++---------- c/todo.txt | 4 ++++ 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/c/dsl/function_manager.c b/c/dsl/function_manager.c index 44cdfb4cc..9bc050fb6 100644 --- a/c/dsl/function_manager.c +++ b/c/dsl/function_manager.c @@ -285,16 +285,22 @@ static function_lookup_t FUNCTION_LOOKUP_TABLE[] = { {FUNC_CLASS_TYPING, "ispresent", 1,0, "True if field is present in input, false otherwise."}, {FUNC_CLASS_TYPING, "isstring", 1,0, "True if field is present with string (including empty-string) value"}, - {FUNC_CLASS_TYPING, "assert_bool", 1,0, "Returns argument if present with boolean value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_boolean", 1,0, "Returns argument if present with boolean value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_empty", 1,0, "Returns argument if present in input with empty value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_float", 1,0, "Returns argument if present with float value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_int", 1,0, "Returns argument if present with int value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_notempty", 1,0, "Returns argument if present in input with non-empty value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_notnull", 1,0, "Returns argument if non-null (non-empty and non-absent), else throws an error."}, - {FUNC_CLASS_TYPING, "assert_numeric", 1,0, "Returns argument if present with int or float value, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_present", 1,0, "Returns argument if present in input, else throws an error."}, - {FUNC_CLASS_TYPING, "assert_string", 1,0, "Returns argument if present with string (including empty-string) value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_absent", 1,0, "Returns argument if it is absent in the input ata, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_bool", 1,0, "Returns argument if it is present with boolean value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_boolean", 1,0, "Returns argument if it is present with boolean value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_empty", 1,0, "Returns argument if it is present in input with empty value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_emptymap", 1,0, "Returns argument if it is a map with empty value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_float", 1,0, "Returns argument if it is present with float value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_int", 1,0, "Returns argument if it is present with int value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_map", 1,0, "Returns argument if it is a map, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_nonemptymap", 1,0, "Returns argument if it is a non-empty map, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_notempty", 1,0, "Returns argument if it is present in input with non-empty value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_notmap", 1,0, "Returns argument if it is not a map, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_notnull", 1,0, "Returns argument if it is non-null (non-empty and non-absent), else throws an error."}, + {FUNC_CLASS_TYPING, "assert_null", 1,0, "Returns argument if it is null (empty or absent), else throws an error."}, + {FUNC_CLASS_TYPING, "assert_numeric", 1,0, "Returns argument if it is present with int or float value, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_present", 1,0, "Returns argument if it is present in input, else throws an error."}, + {FUNC_CLASS_TYPING, "assert_string", 1,0, "Returns argument if it is present with string (including empty-string) value, else throws an error."}, {FUNC_CLASS_CONVERSION, "boolean", 1,0, "Convert int/float/bool/string to boolean."}, {FUNC_CLASS_CONVERSION, "float", 1,0, "Convert int/float/bool/string to float."}, diff --git a/c/todo.txt b/c/todo.txt index ed105df47..7cfad80c9 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -35,6 +35,10 @@ MAPVAR CHECKLIST: ! UT cases detailed below ! assert_map/assert_scalar/etc. + - impl + - UTs + - mlh + - mld * emittable/dumpable/etc md_rhs -> more specific fcn-call.