Commit 302146b0 authored by Kenton Varda's avatar Kenton Varda

Update build files for json-test.capnp.

parent 1ccd2dcb
...@@ -380,7 +380,8 @@ endif LITE_MODE ...@@ -380,7 +380,8 @@ endif LITE_MODE
test_capnpc_inputs = \ test_capnpc_inputs = \
src/capnp/test.capnp \ src/capnp/test.capnp \
src/capnp/test-import.capnp \ src/capnp/test-import.capnp \
src/capnp/test-import2.capnp src/capnp/test-import2.capnp \
src/capnp/compat/json-test.capnp
test_capnpc_outputs = \ test_capnpc_outputs = \
src/capnp/test.capnp.c++ \ src/capnp/test.capnp.c++ \
...@@ -388,7 +389,9 @@ test_capnpc_outputs = \ ...@@ -388,7 +389,9 @@ test_capnpc_outputs = \
src/capnp/test-import.capnp.c++ \ src/capnp/test-import.capnp.c++ \
src/capnp/test-import.capnp.h \ src/capnp/test-import.capnp.h \
src/capnp/test-import2.capnp.c++ \ src/capnp/test-import2.capnp.c++ \
src/capnp/test-import2.capnp.h src/capnp/test-import2.capnp.h \
src/capnp/compat/json-test.capnp.c++ \
src/capnp/compat/json-test.capnp.h
if USE_EXTERNAL_CAPNP if USE_EXTERNAL_CAPNP
......
...@@ -192,6 +192,7 @@ if(BUILD_TESTING) ...@@ -192,6 +192,7 @@ if(BUILD_TESTING)
test.capnp test.capnp
test-import.capnp test-import.capnp
test-import2.capnp test-import2.capnp
compat/json-test.capnp
) )
set(CAPNPC_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/test_capnp") set(CAPNPC_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/test_capnp")
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
@0xc9d405cf4333e4c9; @0xc9d405cf4333e4c9;
using Json = import "json.capnp"; using Json = import "/capnp/compat/json.capnp";
$import "/capnp/c++.capnp".namespace("capnp"); $import "/capnp/c++.capnp".namespace("capnp");
......
...@@ -1210,6 +1210,8 @@ private: ...@@ -1210,6 +1210,8 @@ private:
output.get(variant).as<DynamicStruct>(), unionsSeen); output.get(variant).as<DynamicStruct>(), unionsSeen);
} }
} }
KJ_UNREACHABLE;
} }
const void* getUnionInstanceIdentifier(DynamicStruct::Builder obj) const { const void* getUnionInstanceIdentifier(DynamicStruct::Builder obj) const {
......
...@@ -40,6 +40,7 @@ fi ...@@ -40,6 +40,7 @@ fi
SCHEMA=`dirname "$0"`/../test.capnp SCHEMA=`dirname "$0"`/../test.capnp
JSON_SCHEMA=`dirname "$0"`/../compat/json-test.capnp JSON_SCHEMA=`dirname "$0"`/../compat/json-test.capnp
TESTDATA=`dirname "$0"`/../testdata TESTDATA=`dirname "$0"`/../testdata
SRCDIR=`dirname "$0"`/../..
SUFFIX=${TESTDATA#*/src/} SUFFIX=${TESTDATA#*/src/}
PREFIX=${TESTDATA%${SUFFIX}} PREFIX=${TESTDATA%${SUFFIX}}
...@@ -75,8 +76,8 @@ $CAPNP convert binary:json --short $SCHEMA TestAllTypes < $TESTDATA/binary | cmp ...@@ -75,8 +76,8 @@ $CAPNP convert binary:json --short $SCHEMA TestAllTypes < $TESTDATA/binary | cmp
$CAPNP convert json:binary $SCHEMA TestAllTypes < $TESTDATA/pretty.json | cmp $TESTDATA/binary - || fail json to binary $CAPNP convert json:binary $SCHEMA TestAllTypes < $TESTDATA/pretty.json | cmp $TESTDATA/binary - || fail json to binary
$CAPNP convert json:binary $SCHEMA TestAllTypes < $TESTDATA/short.json | cmp $TESTDATA/binary - || fail short json to binary $CAPNP convert json:binary $SCHEMA TestAllTypes < $TESTDATA/short.json | cmp $TESTDATA/binary - || fail short json to binary
$CAPNP convert json:binary $JSON_SCHEMA TestJsonAnnotations < $TESTDATA/annotated.json | cmp $TESTDATA/annotated-json.binary || fail annotated json to binary $CAPNP convert json:binary $JSON_SCHEMA TestJsonAnnotations -I"$SRCDIR" < $TESTDATA/annotated.json | cmp $TESTDATA/annotated-json.binary || fail annotated json to binary
$CAPNP convert binary:json $JSON_SCHEMA TestJsonAnnotations < $TESTDATA/annotated-json.binary | cmp $TESTDATA/annotated.json || fail annotated json to binary $CAPNP convert binary:json $JSON_SCHEMA TestJsonAnnotations -I"$SRCDIR" < $TESTDATA/annotated-json.binary | cmp $TESTDATA/annotated.json || fail annotated json to binary
# ======================================================================================== # ========================================================================================
# DEPRECATED encode/decode # DEPRECATED encode/decode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment