summaryrefslogtreecommitdiff
path: root/test/translationtest.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2020-09-19 15:12:08 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2020-09-19 15:14:24 +0200
commit62e577cee9e199692d15cf741c0e29ae28f25c52 (patch)
tree3cfe20ce434b986e58efbc9bececcda41502ed33 /test/translationtest.cc
parent19ac4649f16621430b7d34635410fd67fd8ef49e (diff)
Make use of uUnit as a submodule (dgunit renamed).
Diffstat (limited to 'test/translationtest.cc')
-rw-r--r--test/translationtest.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/translationtest.cc b/test/translationtest.cc
index f64e1f3..98cff11 100644
--- a/test/translationtest.cc
+++ b/test/translationtest.cc
@@ -24,7 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include "dgunit.h"
+#include <uunit.h>
#include <locale>
@@ -33,13 +33,13 @@
#include <stdlib.h>
class TranslationTest
- : public DGUnit
+ : public uUnit
{
public:
TranslationTest()
{
- DGUNIT_TEST(TranslationTest::testFromFile);
- DGUNIT_TEST(TranslationTest::testFromLocale);
+ uUNIT_TEST(TranslationTest::testFromFile);
+ uUNIT_TEST(TranslationTest::testFromLocale);
}
void testFromFile()
@@ -47,17 +47,17 @@ public:
Translation t;
char buf[100000];
FILE* fp = fopen(MO_SRC, "r");
- DGUNIT_ASSERT(fp != nullptr);
+ uUNIT_ASSERT(fp != nullptr);
auto sz = fread(buf, 1, sizeof(buf), fp);
fclose(fp);
- DGUNIT_ASSERT(t.load(buf, sz));
+ uUNIT_ASSERT(t.load(buf, sz));
// Look up translation from .mo file
- DGUNIT_ASSERT_EQUAL(std::string("Trommesæt"),
+ uUNIT_ASSERT_EQUAL(std::string("Trommesæt"),
std::string(_("Drumkit")));
// No translation, return key
- DGUNIT_ASSERT_EQUAL(std::string("No translation"),
+ uUNIT_ASSERT_EQUAL(std::string("No translation"),
std::string(_("No translation")));
}
@@ -67,11 +67,11 @@ public:
UITranslation t;
// Look up translation from .mo file
- DGUNIT_ASSERT_EQUAL(std::string("Trommesæt"),
+ uUNIT_ASSERT_EQUAL(std::string("Trommesæt"),
std::string(_("Drumkit")));
// No translation, return key
- DGUNIT_ASSERT_EQUAL(std::string("No translation"),
+ uUNIT_ASSERT_EQUAL(std::string("No translation"),
std::string(_("No translation")));
}
};