aboutsummaryrefslogtreecommitdiff
path: root/src/test/xmlwritetest
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-10-11 15:47:45 +0000
committerMike Buland <eichlan@xagasoft.com>2006-10-11 15:47:45 +0000
commit745875139b5ee46e469927d410364bfeeedb2995 (patch)
tree393d6ded249fdca428539098caeb285479fa7ab3 /src/test/xmlwritetest
parentdf6f199b4e158d1d6cfb99d45258efa22afee715 (diff)
downloadlibbu++-745875139b5ee46e469927d410364bfeeedb2995.tar.gz
libbu++-745875139b5ee46e469927d410364bfeeedb2995.tar.bz2
libbu++-745875139b5ee46e469927d410364bfeeedb2995.tar.xz
libbu++-745875139b5ee46e469927d410364bfeeedb2995.zip
Despite some svn oddness, I'm now moving to a new setup for the tests, that's
very much like the original one, but now using build. You will need the latest build in order to build the tests.
Diffstat (limited to 'src/test/xmlwritetest')
-rw-r--r--src/test/xmlwritetest/xmlwritetest.cpp48
1 files changed, 0 insertions, 48 deletions
diff --git a/src/test/xmlwritetest/xmlwritetest.cpp b/src/test/xmlwritetest/xmlwritetest.cpp
deleted file mode 100644
index 54c7a80..0000000
--- a/src/test/xmlwritetest/xmlwritetest.cpp
+++ /dev/null
@@ -1,48 +0,0 @@
1#include "xmlfilewriter.h"
2#include "xmlstringwriter.h"
3#include "xmlstringreader.h"
4
5void fillItIn( XmlWriter &w )
6{
7 w.addNode("thinglist");
8
9 w.addNode("thing");
10 w.addProperty("type", "Weapon");
11
12 w.addNode("id", "Klophin Staff", true );
13 w.addNode("name", "Klophin Staff", true );
14 w.addNode("durability", "0.01", true );
15 w.addNode("size", "0.1", true );
16
17 w.addNode("config");
18 w.addNode("damage", "3d6+4", true );
19 w.addNode("class", "melee", true );
20 w.addNode("type", "bludgeon", true );
21 w.addNode("damagedesc", "club/clubs", true );
22 w.closeNode();
23
24 w.closeNode();
25
26 w.closeNode();
27}
28
29int main()
30{
31 printf("Testing XmlWriter...\n");
32
33 //XmlStringReader *xsr = new XmlStringReader("<stuff/>");
34
35 //printf("%08X\n%08X\n%08X\n", xsr, (XmlReader *)xsr, (XmlDocument *)xsr );
36
37 //delete (XmlDocument *)xsr;
38 XmlFileWriter wf("test.xml", "\t");
39
40 fillItIn( wf );
41
42 XmlStringWriter ws("\t");
43 fillItIn( ws );
44
45 printf("Now the string version:\n\n%s\n", ws.getString().c_str() );
46
47 return 0;
48}