diff --git a/tests/xtd.core.unit_tests/src/xtd/tests/string_comparer_tests.cpp b/tests/xtd.core.unit_tests/src/xtd/tests/string_comparer_tests.cpp index 54c54941bcc..c9c27c20fe7 100644 --- a/tests/xtd.core.unit_tests/src/xtd/tests/string_comparer_tests.cpp +++ b/tests/xtd.core.unit_tests/src/xtd/tests/string_comparer_tests.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -26,6 +27,12 @@ namespace xtd::tests { assert::is_negative(string_comparer::ordinal().compare("abc", "bca")); } + void test_method_(string_comparer_ordinal_compare_with_time_span) { + assert::is_zero(string_comparer::ordinal().compare(time_span {}, time_span {})); + assert::is_positive(string_comparer::ordinal().compare(time_span {42}, time_span {21})); + assert::is_negative(string_comparer::ordinal().compare(time_span {21}, time_span {42})); + } + void test_method_(string_comparer_ordinal_ignore_case_compare_with_strings) { assert::is_zero(string_comparer::ordinal_ignore_case().compare(string {""}, string {""})); assert::is_zero(string_comparer::ordinal_ignore_case().compare(string {"abc"}, string {"abc"})); @@ -43,5 +50,11 @@ namespace xtd::tests { assert::is_positive(string_comparer::ordinal_ignore_case().compare("bca", "abc")); assert::is_negative(string_comparer::ordinal_ignore_case().compare("abc", "bca")); } + + void test_method_(string_comparer_ordinal_ignore_case_compare_with_time_span) { + assert::is_zero(string_comparer::ordinal_ignore_case().compare(time_span {}, time_span {})); + assert::is_positive(string_comparer::ordinal_ignore_case().compare(time_span {42}, time_span {21})); + assert::is_negative(string_comparer::ordinal_ignore_case().compare(time_span {21}, time_span {42})); + } }; }