[Kst] kdeextragear-2/kst/tests
George Staikos
staikos at kde.org
Tue Dec 14 21:30:38 CET 2004
CVS commit by staikos:
More failing testcases
M +28 -0 testlabelparser.cpp 1.3
--- kdeextragear-2/kst/tests/testlabelparser.cpp #1.2:1.3
@@ -225,4 +225,32 @@ void doTests() {
delete parsed;
+ parsed = Label::parse("x^100");
+ doTest(parsed != 0L);
+ c = parsed->chunk;
+ doTest(c->next != 0L);
+ doTest(c->text == "x");
+ doTest(c->vOffset == Label::Chunk::None);
+ c = c->next;
+ doTest(c->next == 0L);
+ doTest(c->text == "100");
+ doTest(c->vOffset == Label::Chunk::Up);
+ delete parsed;
+
+ parsed = Label::parse("x^100*200");
+ doTest(parsed != 0L);
+ c = parsed->chunk;
+ doTest(c->next != 0L);
+ doTest(c->text == "x");
+ doTest(c->vOffset == Label::Chunk::None);
+ c = c->next;
+ doTest(c->next != 0L);
+ doTest(c->text == "100");
+ doTest(c->vOffset == Label::Chunk::Up);
+ c = c->next;
+ doTest(c->next == 0L);
+ doTest(c->text == "*200");
+ doTest(c->vOffset == Label::Chunk::None);
+ delete parsed;
+
}
More information about the Kst
mailing list