avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dcrea...@apache.org
Subject svn commit: r1175570 [13/13] - in /avro/trunk: ./ lang/c/jansson/ lang/c/jansson/doc/ lang/c/jansson/doc/ext/ lang/c/jansson/src/ lang/c/jansson/test/ lang/c/jansson/test/bin/ lang/c/jansson/test/scripts/ lang/c/jansson/test/suites/ lang/c/jansson/test...
Date Sun, 25 Sep 2011 20:47:42 GMT
Added: avro/trunk/lang/c/jansson/test/suites/valid/real-negative-exponent/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/real-negative-exponent/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/real-negative-exponent/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/real-negative-exponent/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+[0.01]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/input Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+[1e+2]

Added: avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/real-positive-exponent/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+[100.0]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[123e-10000000]

Added: avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/real-underflow/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+[0.0]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/run
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/run?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/run (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/run Sun Sep 25 20:47:26 2011
@@ -0,0 +1,55 @@
+#!/bin/sh
+#
+# Copyright (c) 2009-2011 Petri Lehtinen <petri@digip.org>
+#
+# Jansson is free software; you can redistribute it and/or modify
+# it under the terms of the MIT license. See LICENSE for details.
+
+export JSON_SORT_KEYS=1
+
+is_test() {
+    test -d $test_path
+}
+
+do_run() {
+    variant=$1
+    s=".$1"
+
+    strip=0
+    [ "$variant" = "strip" ] && strip=1
+
+    STRIP=$strip $json_process \
+        <$test_path/input >$test_log/stdout$s 2>$test_log/stderr$s
+    valgrind_check $test_log/stderr$s || return 1
+
+    ref=output
+    [ -f $test_path/output$s ] && ref=output$s
+
+    if ! cmp -s $test_path/$ref $test_log/stdout$s; then
+        echo $variant > $test_log/variant
+        return 1
+    fi
+}
+
+run_test() {
+    do_run normal && do_run strip
+}
+
+show_error() {
+    valgrind_show_error && return
+
+    read variant < $test_log/variant
+    s=".$variant"
+
+    echo "VARIANT: $variant"
+
+    echo "EXPECTED OUTPUT:"
+    ref=output
+    [ -f $test_path/output$s ] && ref=output$s
+    nl -bn $test_path/$ref
+
+    echo "ACTUAL OUTPUT:"
+    nl -bn $test_log/stdout$s
+}
+
+. $top_srcdir/test/scripts/run-tests.sh

Propchange: avro/trunk/lang/c/jansson/test/suites/valid/run
------------------------------------------------------------------------------
    svn:executable = *

Added: avro/trunk/lang/c/jansson/test/suites/valid/short-string/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/short-string/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/short-string/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/short-string/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["a"]

Added: avro/trunk/lang/c/jansson/test/suites/valid/short-string/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/short-string/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/short-string/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/short-string/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["a"]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/input Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+["abcdefghijklmnopqrstuvwxyz1234567890 "]

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-ascii-string/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+["abcdefghijklmnopqrstuvwxyz1234567890 "]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[0]

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-int-0/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[0]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[1]

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-int-1/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[1]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[123]

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-int-123/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+[123]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-object/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-object/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-object/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-object/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+{"a":[]}

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-object/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-object/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-object/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-object/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+{"a": []}
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-real/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-real/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-real/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-real/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[123.456789]

Added: avro/trunk/lang/c/jansson/test/suites/valid/simple-real/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/simple-real/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/simple-real/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/simple-real/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[123.456789]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["\"\\\/\b\f\n\r\t"]

Added: avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/string-escapes/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+["\"\\/\b\f\n\r\t"]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/input Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+["\u0821 three-byte UTF-8"]

Added: avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/three-byte-utf-8/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+["à ¡ three-byte UTF-8"]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/true/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/true/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/true/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/true/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[true]

Added: avro/trunk/lang/c/jansson/test/suites/valid/true/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/true/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/true/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/true/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+[true]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["\u0123 two-byte UTF-8"]

Added: avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/two-byte-utf-8/output Sun Sep 25 20:47:26
2011
@@ -0,0 +1 @@
+["Ä£ two-byte UTF-8"]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/input Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"]

Added: avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/utf-8-string/output Sun Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["€þıœəßð some utf-8 ĸʒ×ŋµåäö𝄞"]
\ No newline at end of file

Added: avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/input
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/input?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/input (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/input Sun
Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["\uD834\uDD1E surrogate, four-byte UTF-8"]

Added: avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/output
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/output?rev=1175570&view=auto
==============================================================================
--- avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/output (added)
+++ avro/trunk/lang/c/jansson/test/suites/valid/utf-surrogate-four-byte-encoding/output Sun
Sep 25 20:47:26 2011
@@ -0,0 +1 @@
+["𝄞 surrogate, four-byte UTF-8"]
\ No newline at end of file

Modified: avro/trunk/lang/c/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/CMakeLists.txt?rev=1175570&r1=1175569&r2=1175570&view=diff
==============================================================================
--- avro/trunk/lang/c/src/CMakeLists.txt (original)
+++ avro/trunk/lang/c/src/CMakeLists.txt Sun Sep 25 20:47:26 2011
@@ -77,16 +77,18 @@ set(AVRO_SRC
 
 set(JANSSON_SRC
     ../jansson/src/dump.c
+    ../jansson/src/error.c
     ../jansson/src/hashtable.c
     ../jansson/src/hashtable.h
     ../jansson/src/jansson.h
     ../jansson/src/jansson_private.h
     ../jansson/src/load.c
+    ../jansson/src/memory.c
+    ../jansson/src/pack_unpack.c
     ../jansson/src/strbuffer.c
     ../jansson/src/strbuffer.h
     ../jansson/src/utf.c
     ../jansson/src/utf.h
-    ../jansson/src/util.h
     ../jansson/src/value.c
 )
 

Modified: avro/trunk/lang/c/src/schema.c
URL: http://svn.apache.org/viewvc/avro/trunk/lang/c/src/schema.c?rev=1175570&r1=1175569&r2=1175570&view=diff
==============================================================================
--- avro/trunk/lang/c/src/schema.c (original)
+++ avro/trunk/lang/c/src/schema.c Sun Sep 25 20:47:26 2011
@@ -1093,7 +1093,7 @@ avro_schema_from_json(const char *jsonte
 		return ENOMEM;
 	}
 
-	root = json_loads(jsontext, &error->json_error);
+	root = json_loads(jsontext, 0, &error->json_error);
 	if (!root) {
 		avro_set_error("Error parsing JSON: %s", error->json_error.text);
 		st_free_table(error->named_schemas);



Mime
View raw message