diff options
Diffstat (limited to 'source/blender/io/wavefront_obj/tests/obj_import_string_utils_tests.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/tests/obj_import_string_utils_tests.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/io/wavefront_obj/tests/obj_import_string_utils_tests.cc b/source/blender/io/wavefront_obj/tests/obj_import_string_utils_tests.cc index addb1fa473e..46e093bb8a7 100644 --- a/source/blender/io/wavefront_obj/tests/obj_import_string_utils_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_import_string_utils_tests.cc @@ -21,6 +21,19 @@ TEST(obj_import_string_utils, read_next_line) EXPECT_TRUE(s.is_empty()); } +static StringRef drop_whitespace(StringRef s) +{ + return StringRef(drop_whitespace(s.begin(), s.end()), s.end()); +} +static StringRef parse_int(StringRef s, int fallback, int &dst, bool skip_space = true) +{ + return StringRef(parse_int(s.begin(), s.end(), fallback, dst, skip_space), s.end()); +} +static StringRef parse_float(StringRef s, float fallback, float &dst, bool skip_space = true) +{ + return StringRef(parse_float(s.begin(), s.end(), fallback, dst, skip_space), s.end()); +} + TEST(obj_import_string_utils, drop_whitespace) { /* Empty */ |