]> git.sesse.net Git - xml-template/commitdiff
Add attribute-empty test for C++0x, which passes.
authorsgunderson@bigfoot.com <>
Wed, 21 Sep 2011 23:25:53 +0000 (01:25 +0200)
committersgunderson@bigfoot.com <>
Wed, 21 Sep 2011 23:25:53 +0000 (01:25 +0200)
c++0x/Makefile
c++0x/attribute-empty.cpp [new file with mode: 0644]

index 837cb06780733ff353f328f7696d17c426ac73f7..79c4024809ab25a41ad7763f1a25277c1f54f1ec 100644 (file)
@@ -21,6 +21,9 @@ attribute2: attribute2.o $(LIBS)
 attribute3: attribute3.o $(LIBS)
        $(CXX) -o $@ $< $(LIBS) $(LDFLAGS)
 
+attribute-empty: attribute-empty.o $(LIBS)
+       $(CXX) -o $@ $< $(LIBS) $(LDFLAGS)
+
 namespace: namespace.o $(LIBS)
        $(CXX) -o $@ $< $(LIBS) $(LDFLAGS)
 
diff --git a/c++0x/attribute-empty.cpp b/c++0x/attribute-empty.cpp
new file mode 100644 (file)
index 0000000..b79836b
--- /dev/null
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+#include "xml-template.h"
+
+using namespace std;
+
+int main(int argc, char **argv)
+{
+       Substitute master_directive = {
+               make_pair("color", new Replace("blue")),
+               make_pair("#things", new Clone { }),
+       };
+
+       process_file("../xml/clone.xml", argv[1], &master_directive);
+       return(0);
+}