[Kst] extragear/graphics/kst/tests
George Staikos
staikos at kde.org
Thu Jun 16 20:13:45 CEST 2005
SVN commit 426219 by staikos:
tests
M +31 -0 testlabelparser.cpp
--- trunk/extragear/graphics/kst/tests/testlabelparser.cpp #426218:426219
@@ -129,6 +129,33 @@
doTest(c->vOffset == Label::Chunk::Down);
delete parsed;
+ parsed = Label::parse("x^{}");
+ doTest(parsed != 0L);
+ c = parsed->chunk;
+ doTest(c->prev == 0L);
+ doTest(c->next == 0L);
+ doTest(c->up != 0L);
+ doTest(c->down == 0L);
+ doTest(c->text == "x");
+ doTest(c->symbol == false);
+ doTest(c->vOffset == Label::Chunk::None);
+ c = c->up;
+ doTest(c->prev != 0L);
+ doTest(c->next != 0L);
+ doTest(c->up == 0L);
+ doTest(c->down == 0L);
+ doTest(c->group);
+ doTest(c->vOffset == Label::Chunk::Up);
+ c = c->next;
+ doTest(c->text == "");
+ doTest(c->prev != 0L);
+ doTest(c->next == 0L);
+ doTest(c->up == 0L);
+ doTest(c->down == 0L);
+ doTest(c->symbol == false);
+ doTest(c->vOffset == Label::Chunk::None);
+ delete parsed;
+
parsed = Label::parse("x^{y+1}_{z-1}");
doTest(parsed != 0L);
c = parsed->chunk;
@@ -352,6 +379,10 @@
doTest(c->scalar);
delete parsed;
+ parsed = Label::parse("\\Sigma^{(x+5)^2}_{5+1} + \\Pi^{\\Sigma^{i-j}_{i+j}}_{x = 0} + 5");
+ doTest(parsed != 0L);
+ // more to test...
+ delete parsed;
}
More information about the Kst
mailing list