Author: thiru
Date: Thu Jun 13 18:48:49 2013
New Revision: 1492812
URL: http://svn.apache.org/r1492812
Log:
AVRO-1181 compileJsonSchemaFromString(std::string) declared in Compiler.hh but
not defined
Modified:
avro/trunk/CHANGES.txt
avro/trunk/lang/c++/impl/Compiler.cc
avro/trunk/lang/c++/test/SchemaTests.cc
Modified: avro/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1492812&r1=1492811&r2=1492812&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Thu Jun 13 18:48:49 2013
@@ -98,6 +98,8 @@ Trunk (not yet released)
AVRO-1331. Java: Fix schema-parsing incompatibility from AVRO-1295.
(cutting)
+ AVRO-1181. compileJsonSchemaFromString(std::string) declared in
Compiler.hh but not defined (Daniel Russel via thiru)
+
Avro 1.7.4 (22 February 2012)
NEW FEATURES
Modified: avro/trunk/lang/c++/impl/Compiler.cc
URL:
http://svn.apache.org/viewvc/avro/trunk/lang/c%2B%2B/impl/Compiler.cc?rev=1492812&r1=1492811&r2=1492812&view=diff
==============================================================================
--- avro/trunk/lang/c++/impl/Compiler.cc (original)
+++ avro/trunk/lang/c++/impl/Compiler.cc Thu Jun 13 18:48:49 2013
@@ -300,6 +300,12 @@ AVRO_DECL ValidSchema compileJsonSchemaF
::strlen(input));
}
+AVRO_DECL ValidSchema compileJsonSchemaFromString(const std::string& input)
+{
+ return compileJsonSchemaFromMemory(
+ reinterpret_cast<const uint8_t*>(&input[0]), input.size());
+}
+
static ValidSchema compile(std::istream& is)
{
std::auto_ptr<InputStream> in = istreamInputStream(is);
Modified: avro/trunk/lang/c++/test/SchemaTests.cc
URL:
http://svn.apache.org/viewvc/avro/trunk/lang/c%2B%2B/test/SchemaTests.cc?rev=1492812&r1=1492811&r2=1492812&view=diff
==============================================================================
--- avro/trunk/lang/c++/test/SchemaTests.cc (original)
+++ avro/trunk/lang/c++/test/SchemaTests.cc Thu Jun 13 18:48:49 2013
@@ -137,6 +137,12 @@ static void testBasic_fail(const char* s
BOOST_CHECK_THROW(compileJsonSchemaFromString(schema), Exception);
}
+static void testCompile(const char* schema)
+{
+ BOOST_CHECKPOINT(schema);
+ compileJsonSchemaFromString(std::string(schema));
+}
+
}
}
@@ -155,6 +161,7 @@ init_unit_test_suite(int argc, char* arg
ADD_PARAM_TEST(ts, avro::schema::testBasic, avro::schema::basicSchemas);
ADD_PARAM_TEST(ts, avro::schema::testBasic_fail,
avro::schema::basicSchemaErrors);
+ ADD_PARAM_TEST(ts, avro::schema::testCompile, avro::schema::basicSchemas);
return ts;
}