on master help sign in
Merge pull request #8 from jgilje/master
6796fc2Nicolas Seriot
parsers/test_qt/build.shnew file+4
@@ -0,0 +1,4 @@
1+#!/bin/sh
2+
3+qmake .
4+make
parsers/test_qt/main.cppnew file+25
@@ -0,0 +1,25 @@
1+#include <QCoreApplication>
2+
3+#include <QFile>
4+#include <QJsonDocument>
5+
6+int main(int argc, char *argv[]) {
7+ if (argc < 1) {
8+ return 1;
9+ }
10+
11+ QFile file(argv[1]);
12+ if (! file.open(QIODevice::ReadOnly)) {
13+ return 1;
14+ }
15+
16+ auto bytes = file.readAll();
17+ QJsonParseError parseError;
18+ QJsonDocument::fromJson(bytes, &parseError);
19+
20+ if (parseError.error != QJsonParseError::NoError) {
21+ return 1;
22+ }
23+
24+ return 0;
25+}
parsers/test_qt/test_qt.pronew file+12
@@ -0,0 +1,12 @@
1+QT += core
2+QT -= gui
3+
4+CONFIG += c++11
5+
6+TARGET = test_qt
7+CONFIG += console
8+CONFIG -= app_bundle
9+
10+TEMPLATE = app
11+
12+SOURCES += main.cpp
run_tests.py+5
@@ -202,6 +202,11 @@ programs = {
202 "url":"https://github.com/bos/aeson",
202 "url":"https://github.com/bos/aeson",
203 "commands":[os.path.join(PARSERS_DIR, "test_haskell-aeson/.stack-work/install/x86_64-osx/lts-6.22/7.10.3/bin/testaeson")]
203 "commands":[os.path.join(PARSERS_DIR, "test_haskell-aeson/.stack-work/install/x86_64-osx/lts-6.22/7.10.3/bin/testaeson")]
204 },
204 },
205+ "Qt JSON":
206+ {
207+ "url":"",
208+ "commands":[os.path.join(PARSERS_DIR, "test_qt/test_qt")]
209+ },
205}
210}
206
211
207def run_tests(restrict_to_path=None):
212def run_tests(restrict_to_path=None):