diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-25 01:41:49 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-01-25 01:41:49 (GMT) |
commit | 32921490d0d7dc0a2e0828e6f1051e74d27550cf (patch) | |
tree | fe0a816013ddfb2c4d8b2fa885a6b56c61e670f8 /test/src/test-url.cpp | |
parent | 3be96d1aa3024c1acc129e587f5d3165c9434e48 (diff) | |
download | uscxml-32921490d0d7dc0a2e0828e6f1051e74d27550cf.zip uscxml-32921490d0d7dc0a2e0828e6f1051e74d27550cf.tar.gz uscxml-32921490d0d7dc0a2e0828e6f1051e74d27550cf.tar.bz2 |
Started to resolve scxml-test-framework tests from SCION suite
Diffstat (limited to 'test/src/test-url.cpp')
-rw-r--r-- | test/src/test-url.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/src/test-url.cpp b/test/src/test-url.cpp index 4e94455..e3ca1e3 100644 --- a/test/src/test-url.cpp +++ b/test/src/test-url.cpp @@ -1,4 +1,5 @@ #include "uscxml/URL.h" +#include "uscxml/Message.h" #include <assert.h> #include <boost/algorithm/string.hpp> #include <iostream> @@ -7,6 +8,24 @@ using namespace uscxml; using namespace boost; int main(int argc, char** argv) { + + { + Data data = Data::fromJSON("asdf"); + std::cout << data << std::endl; + } + { + Data data = Data::fromJSON("[ '1', '2', '3', '4' ]"); + std::cout << data << std::endl; + } + { + Data data = Data::fromJSON("{'foo1': 'bar2', 'foo3': { 'foo4': 'bar5' }, 'foo6': 'bar7', 'foo8': { 'foo9': 'foo10': { 'foo11': 'bar12' } } }"); + std::cout << data << std::endl; + } + { + Data data = Data::fromJSON("{\"firstName\": \"John\", \"lastName\": \"Smith\", \"age\": 25, \"address\": { \"streetAddress\": \"21 2nd Street\", \"city\": \"New York\",\"state\": \"NY\",\"postalCode\": 10021},\"phoneNumber\": [{\"type\": \"home\",\"number\": \"212 555-1234\"},{ \"type\": \"fax\",\"number\": \"646 555-4567\"}]}"); + std::cout << data << std::endl; + } + { URL url("http://www.heise.de/index.html"); std::cout << url.asString() << std::endl; |