projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
af25866
)
Debug code to print out available icu locales.
author
Carl Hetherington
<cth@carlh.net>
Tue, 17 Jan 2023 20:51:33 +0000
(21:51 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Tue, 17 Jan 2023 21:41:46 +0000
(22:41 +0100)
test/collator_test.cc
patch
|
blob
|
history
diff --git
a/test/collator_test.cc
b/test/collator_test.cc
index 477b3747f0b2b90cfb99f33cde2e3720c5212c0c..035de9919ffa0e5f20d66243907d56b490d5d3c0 100644
(file)
--- a/
test/collator_test.cc
+++ b/
test/collator_test.cc
@@
-20,6
+20,8
@@
#include "lib/collator.h"
#include "lib/collator.h"
+#include <unicode/uenum.h>
+#include <unicode/coll.h>
#include <boost/test/unit_test.hpp>
#include <boost/test/unit_test.hpp>
@@
-27,6
+29,20
@@
BOOST_AUTO_TEST_CASE(collator_compare_works_and_ignores_case)
{
Collator collator("en");
{
Collator collator("en");
+#if 0
+ // Print out available locales
+ // UErrorCode status;
+ // auto available = ucol_openAvailableLocales(&status);
+ // int32_t length = 0;
+ // while (true) {
+ // auto next = uenum_next(available, &length, &status);
+ // if (!next) {
+ // break;
+ // }
+ // std::cout << next << "\n";
+ // }
+#endif
+
BOOST_CHECK_EQUAL(collator.compare("So often YOU won't even notice", "SO OFTEN you won't even NOTiCE"), 0);
BOOST_CHECK_EQUAL(collator.compare("So often YOU won't even notice", "SO OFTEN you won't even see"), -1);
}
BOOST_CHECK_EQUAL(collator.compare("So often YOU won't even notice", "SO OFTEN you won't even NOTiCE"), 0);
BOOST_CHECK_EQUAL(collator.compare("So often YOU won't even notice", "SO OFTEN you won't even see"), -1);
}