avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r956103 - in /avro/trunk: ./ doc/src/content/xdocs/ lang/java/ lang/java/src/java/org/apache/avro/genavro/ lang/java/src/java/org/apache/avro/idl/ lang/java/src/java/org/apache/avro/tool/ lang/java/src/test/genavro/ lang/java/src/test/idl/ ...
Date Fri, 18 Jun 2010 19:18:45 GMT
Author: cutting
Date: Fri Jun 18 19:18:44 2010
New Revision: 956103

URL: http://svn.apache.org/viewvc?rev=956103&view=rev
Log:
AVRO-372.  Rename GenAvro to be Avro IDL.

Added:
    avro/trunk/doc/src/content/xdocs/idl.xml
      - copied, changed from r955435, avro/trunk/doc/src/content/xdocs/genavro.xml
    avro/trunk/lang/java/src/java/org/apache/avro/idl/
      - copied from r955435, avro/trunk/lang/java/src/java/org/apache/avro/genavro/
    avro/trunk/lang/java/src/java/org/apache/avro/idl/idl.jj
      - copied, changed from r955435, avro/trunk/lang/java/src/java/org/apache/avro/genavro/genavro.jj
    avro/trunk/lang/java/src/java/org/apache/avro/tool/IdlTool.java
      - copied, changed from r955435, avro/trunk/lang/java/src/java/org/apache/avro/tool/GenAvroTool.java
    avro/trunk/lang/java/src/test/idl/
      - copied from r955435, avro/trunk/lang/java/src/test/genavro/
    avro/trunk/lang/java/src/test/idl/input/interop.avdl
      - copied unchanged from r955435, avro/trunk/lang/java/src/test/genavro/input/interop.genavro
    avro/trunk/lang/java/src/test/idl/input/mr_events.avdl
      - copied unchanged from r955435, avro/trunk/lang/java/src/test/genavro/input/mr_events.genavro
    avro/trunk/lang/java/src/test/idl/input/namespaces.avdl
      - copied unchanged from r955435, avro/trunk/lang/java/src/test/genavro/input/namespaces.genavro
    avro/trunk/lang/java/src/test/idl/input/reservedwords.avdl
      - copied unchanged from r955435, avro/trunk/lang/java/src/test/genavro/input/reservedwords.genavro
    avro/trunk/lang/java/src/test/idl/input/simple.avdl
      - copied unchanged from r955435, avro/trunk/lang/java/src/test/genavro/input/simple.genavro
    avro/trunk/lang/java/src/test/idl/input/unicode.avdl
      - copied unchanged from r955435, avro/trunk/lang/java/src/test/genavro/input/unicode.genavro
    avro/trunk/lang/java/src/test/java/org/apache/avro/idl/
      - copied from r955435, avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/
    avro/trunk/lang/java/src/test/java/org/apache/avro/idl/TestIdl.java
      - copied, changed from r955435, avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java
Removed:
    avro/trunk/doc/src/content/xdocs/genavro.xml
    avro/trunk/lang/java/src/java/org/apache/avro/genavro/
    avro/trunk/lang/java/src/java/org/apache/avro/idl/genavro.jj
    avro/trunk/lang/java/src/java/org/apache/avro/tool/GenAvroTool.java
    avro/trunk/lang/java/src/test/genavro/
    avro/trunk/lang/java/src/test/idl/input/interop.genavro
    avro/trunk/lang/java/src/test/idl/input/mr_events.genavro
    avro/trunk/lang/java/src/test/idl/input/namespaces.genavro
    avro/trunk/lang/java/src/test/idl/input/reservedwords.genavro
    avro/trunk/lang/java/src/test/idl/input/simple.genavro
    avro/trunk/lang/java/src/test/idl/input/unicode.genavro
    avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/
    avro/trunk/lang/java/src/test/java/org/apache/avro/idl/TestGenAvro.java
Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/doc/src/content/xdocs/site.xml
    avro/trunk/lang/java/build.xml
    avro/trunk/lang/java/src/java/org/apache/avro/tool/Main.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=956103&r1=956102&r2=956103&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Fri Jun 18 19:18:44 2010
@@ -4,6 +4,9 @@ Avro 1.4.0 (unreleased)
 
   INCOMPATIBLE CHANGES
 
+    AVRO-372.  Rename GenAvro to be Avro IDL.  The tool name is now
+    'idl'.  The file suffix is now '.avdl'.  (cutting)
+
   NEW FEATURES
 
     AVRO-493. Add support for Hadoop Mapreduce with Avro data files. (cutting)

Copied: avro/trunk/doc/src/content/xdocs/idl.xml (from r955435, avro/trunk/doc/src/content/xdocs/genavro.xml)
URL: http://svn.apache.org/viewvc/avro/trunk/doc/src/content/xdocs/idl.xml?p2=avro/trunk/doc/src/content/xdocs/idl.xml&p1=avro/trunk/doc/src/content/xdocs/genavro.xml&r1=955435&r2=956103&rev=956103&view=diff
==============================================================================
--- avro/trunk/doc/src/content/xdocs/genavro.xml (original)
+++ avro/trunk/doc/src/content/xdocs/idl.xml Fri Jun 18 19:18:44 2010
@@ -22,14 +22,14 @@
 ]>
 <document>
   <header>
-    <title>Avro &AvroVersion; GenAvro Language Docs</title>
+    <title>Avro IDL &AvroVersion;</title>
   </header>
   <body>
 
     <section id="preamble">
       <title>Introduction</title>
 
-      <p>This document defines GenAvro, an experimental higher-level language for authoring
Avro schemata.
+      <p>This document defines Avro IDL, an experimental higher-level language for
authoring Avro schemata.
       Before reading this document, you should have familiarity with the concepts of schemata
and protocols,
       as well as the various primitive and complex types available in Avro.
       </p>
@@ -44,40 +44,40 @@
       <title>Overview</title>
       <section id="overview_purpose">
         <title>Purpose</title>
-        <p>The aim of the GenAvro language is to enable developers to author schemata
in a way that
+        <p>The aim of the Avro IDL language is to enable developers to author schemata
in a way that
         feels more similar to common programming languages like Java, C++, or Python. Additionally,
-        the GenAvro language may feel more familiar for those users who have previously used
the
+        the Avro IDL language may feel more familiar for those users who have previously
used the
         interface description languages (IDLs) in other frameworks like Thrift, Protocol
Buffers, or CORBA.
         </p>
       </section>
       <section id="overview_usage">
         <title>Usage</title>
         <p>
-          Each GenAvro file defines a single Avro Protocol, and thus generates as its output
a JSON-format
+          Each Avro IDL file defines a single Avro Protocol, and thus generates as its output
a JSON-format
           Avro Protocol file with extension <code>.avpr</code>.
         </p>
         <p>
-          To convert a <code>.genavro</code> file into a <code>.avpr</code>
file, it must be processed by the
-          <code>avroj genavro</code> tool. For example:
+          To convert a <code>.avdl</code> file into a <code>.avpr</code>
file, it must be processed by the
+          <code>idl</code> tool. For example:
         </p>
         <source>
-$ java -jar avroj-1.3.0.jar genavro src/test/genavro/input/namespaces.genavro /tmp/namespaces.avpr
+$ java -jar avroj-tools-1.4.0.jar idl src/test/idl/input/namespaces.avdl /tmp/namespaces.avpr
 $ head /tmp/namespaces.avpr
 {
   "protocol" : "TestNamespace",
   "namespace" : "avro.test.protocol",
         </source>
         <p>
-          The <code>avroj genavro</code> tool can also process input to and from
<em>stdin</em> and <em>stdout</em>.
-          See <code>avroj genavro --help</code> for full usage information.
+          The <code>idl</code> tool can also process input to and from <em>stdin</em>
and <em>stdout</em>.
+          See <code>idl --help</code> for full usage information.
         </p>
       </section>
     </section> <!-- end overview -->
 
     <section id="defining_protocol">
-      <title>Defining a Protocol in GenAvro</title>
+      <title>Defining a Protocol in Avro IDL</title>
 
-      <p>A GenAvro file consists of exactly one protocol definition. The minimal protocol
is defined
+      <p>An Avro IDL file consists of exactly one protocol definition. The minimal
protocol is defined
       by the following code:
       </p>
       <source>
@@ -105,11 +105,11 @@ protocol MyProtocol {
 }
       </source>
       <p>
-3        This notation is used throughout GenAvro as a way of specifying properties for the
annotated element,
+3        This notation is used throughout Avro IDL as a way of specifying properties for
the annotated element,
         as will be described later in this document.
       </p>
       <p>
-        Protocols in GenAvro can contain the following items:
+        Protocols in Avro IDL can contain the following items:
       </p>
         <ul>
           <li>Definitions of named schemata, including <em>record</em>s,
<em>error</em>s, <em>enum</em>s, and <em>fixed</em>s.</li>
@@ -119,7 +119,7 @@ protocol MyProtocol {
     <section id="format_enums">
       <title>Defining an Enumeration</title>
       <p>
-        Enums are defined in GenAvro using a syntax similar to C or Java:
+        Enums are defined in Avro IDL using a syntax similar to C or Java:
       </p>
       <source>
 enum Suit {
@@ -144,7 +144,7 @@ fixed MD5(16);
     <section id="format_records">
       <title>Defining Records and Errors</title>
       <p>
-        Records are defined in GenAvro using a syntax similar to a <code>struct</code>
definition in C:
+        Records are defined in Avro IDL using a syntax similar to a <code>struct</code>
definition in C:
       </p>
       <source>
 record Employee {
@@ -169,7 +169,7 @@ error Kaboom {
       <p>
         Each field in a record or error consists of a type and a name, along with optional
property annotations.
       </p>
-      <p>A type reference in GenAvro must be one of:</p>
+      <p>A type reference in Avro IDL must be one of:</p>
       <ul>
         <li>A primitive type</li>
         <li>A named schema defined prior to this usage in the same Protocol</li>
@@ -178,7 +178,7 @@ error Kaboom {
 
       <section id="primitive_types">
         <title>Primitive Types</title>
-        <p>The primitive types supported by GenAvro are the same as those supported
by Avro's JSON format.
+        <p>The primitive types supported by Avro IDL are the same as those supported
by Avro's JSON format.
         This list includes <code>int</code>, <code>long</code>, <code>string</code>,
<code>boolean</code>,
         <code>float</code>, <code>double</code>, <code>null</code>,
and <code>bytes</code>.
         </p>
@@ -186,7 +186,7 @@ error Kaboom {
 
       <section id="schema_references">
         <title>References to Named Schemata</title>
-        <p>If a named schema has already been defined in the same GenAvro file, it
may be referenced by name
+        <p>If a named schema has already been defined in the same Avro IDL file, it
may be referenced by name
         as if it were a primitive type:
         </p>
         <source>
@@ -227,7 +227,7 @@ record RecordWithUnion {
 }
           </source>
           <p>
-            Note that the same restrictions apply to GenAvro unions as apply to unions defined
in the
+            Note that the same restrictions apply to Avro IDL unions as apply to unions defined
in the
             JSON format; namely, a record may not contain multiple elements of the same type.
           </p>
         </section> <!-- unions -->
@@ -235,7 +235,7 @@ record RecordWithUnion {
     </section> <!-- how to define records -->
     <section id="define_messages">
       <title>Defining RPC Messages</title>
-      <p>The syntax to define an RPC message within a GenAvro protocol is similar to
the syntax for
+      <p>The syntax to define an RPC message within a Avro IDL protocol is similar
to the syntax for
       a method declaration within a C header file or a Java interface. To define an RPC message
       <code>add</code> which takes two arguments named <code>foo</code>
and <code>bar</code>,
       returning an <code>int</code>, simply include the following definition
within the protocol:
@@ -261,7 +261,7 @@ void goKaboom() throws Kaboom;
       <title>Other Language Features</title>
       <section id="minutiae_comments">
         <title>Comments</title>
-        <p>All Java-style comments are supported within a GenAvro file. Any text following
+        <p>All Java-style comments are supported within a Avro IDL file. Any text following
         <code>//</code> on a line is ignored, as is any text between <code>/*</code>
and
         <code>*/</code>, possibly spanning multiple lines.</p>
       </section>
@@ -280,7 +280,7 @@ void `error`();
         <title>Annotations for Ordering and Namespaces</title>
         <p>
           Java-style annotations may be used to add additional properties to types throughout
-          GenAvro. For example, to specify the sort order of a field within a record, one
may use
+          Avro IDL. For example, to specify the sort order of a field within a record, one
may use
           the <code>@order</code> annotation as follows:
         </p>
         <source>
@@ -316,10 +316,10 @@ protocol MyProto {
     </section>
     <section id="example">
       <title>Complete Example</title>
-      <p>The following is a complete example of a GenAvro file that shows most of the
above features:</p>
+      <p>The following is a complete example of a Avro IDL file that shows most of
the above features:</p>
       <source>
 /**
- * An example protocol in GenAvro
+ * An example protocol in Avro IDL
  */
 @namespace("org.apache.avro.test")
 protocol Simple {
@@ -356,7 +356,7 @@ protocol Simple {
   void `error`() throws TestError;
 }
       </source>
-      <p>Additional examples may be found in the Avro source tree under the <code>src/test/genavro/input</code>
directory.</p>
+      <p>Additional examples may be found in the Avro source tree under the <code>src/test/idl/input</code>
directory.</p>
     </section>
   </body>
 </document>

Modified: avro/trunk/doc/src/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/avro/trunk/doc/src/content/xdocs/site.xml?rev=956103&r1=956102&r2=956103&view=diff
==============================================================================
--- avro/trunk/doc/src/content/xdocs/site.xml (original)
+++ avro/trunk/doc/src/content/xdocs/site.xml Fri Jun 18 19:18:44 2010
@@ -45,7 +45,7 @@ See http://forrest.apache.org/docs/linki
     <java-api   label="Java API"          href="ext:api/java/index" />
     <c-api      label="C API"             href="ext:api/c/index" />
     <cpp-api    label="C++ API"           href="ext:api/cpp/index" />
-    <genavro    label="GenAvro language"  href="genavro.html" />
+    <idl        label="IDL language"      href="idl.html" />
     <wiki       label="Wiki"              href="ext:wiki" />
     <faq        label="FAQ"               href="ext:faq" />
   </docs>

Modified: avro/trunk/lang/java/build.xml
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/build.xml?rev=956103&r1=956102&r2=956103&view=diff
==============================================================================
--- avro/trunk/lang/java/build.xml (original)
+++ avro/trunk/lang/java/build.xml Fri Jun 18 19:18:44 2010
@@ -51,8 +51,8 @@
   <property name="test.junit.output.format" value="plain"/>
   <property name="test.java.src.dir" value="${basedir}/src/test/java"/>
   <property name="test.schemata.dir" value="${share.dir}/test/schemas"/>
-  <property name="test.genavro.dir" value="${basedir}/src/test/genavro"/>
-  <property name="test.genavro.mode" value="run" />
+  <property name="test.idl.dir" value="${basedir}/src/test/idl"/>
+  <property name="test.idl.mode" value="run" />
   <property name="test.java.build.dir" value="${build.dir}/test"/>
   <property name="test.java.generated.build.dir" value="${test.java.build.dir}/generated"/>
   <property name="test.java.generated.dir" value="${test.java.generated.build.dir}/src"/>
@@ -142,15 +142,15 @@
 
   <target name="javacc-check" depends="ivy-retrieve-build">
   <uptodate property="javacc.uptodate"
-            srcfile="${java.src.dir}/org/apache/avro/genavro/genavro.jj"
-            targetfile="${build.dir}/src/org/apache/avro/genavro"/>
+            srcfile="${java.src.dir}/org/apache/avro/idl/idl.jj"
+            targetfile="${build.dir}/src/org/apache/avro/idl"/>
   </target>
 
   <target name="javacc" depends="javacc-check" unless="javacc.uptodate">
-    <mkdir dir="${build.dir}/src/org/apache/avro/genavro"/>
+    <mkdir dir="${build.dir}/src/org/apache/avro/idl"/>
     <copy tofile="${ivy.lib}/javacc.jar" file="${ivy.lib}/javacc-5.0.jar"/>
-    <javacc target="${java.src.dir}/org/apache/avro/genavro/genavro.jj"
-            outputdirectory="${build.dir}/src/org/apache/avro/genavro"
+    <javacc target="${java.src.dir}/org/apache/avro/idl/idl.jj"
+            outputdirectory="${build.dir}/src/org/apache/avro/idl"
             javacchome="${ivy.lib}"/>
   </target>
 
@@ -350,8 +350,8 @@
         <sysproperty key="test.dir" value="@{test.dir}"/>
         <sysproperty key="share.dir" value="${share.dir}"/>
         <sysproperty key="test.validate" value="${test.validate}"/>
-        <sysproperty key="test.genavro.dir" value="${test.genavro.dir}" />
-        <sysproperty key="test.genavro.mode" value="${test.genavro.mode}" />
+        <sysproperty key="test.idl.dir" value="${test.idl.dir}" />
+        <sysproperty key="test.idl.mode" value="${test.idl.mode}" />
         <classpath refid="test.java.classpath"/>
         <formatter type="${test.junit.output.format}"/>
         <batchtest todir="${test.java.build.dir}" unless="testcase">

Copied: avro/trunk/lang/java/src/java/org/apache/avro/idl/idl.jj (from r955435, avro/trunk/lang/java/src/java/org/apache/avro/genavro/genavro.jj)
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/src/java/org/apache/avro/idl/idl.jj?p2=avro/trunk/lang/java/src/java/org/apache/avro/idl/idl.jj&p1=avro/trunk/lang/java/src/java/org/apache/avro/genavro/genavro.jj&r1=955435&r2=956103&rev=956103&view=diff
==============================================================================
--- avro/trunk/lang/java/src/java/org/apache/avro/genavro/genavro.jj (original)
+++ avro/trunk/lang/java/src/java/org/apache/avro/idl/idl.jj Fri Jun 18 19:18:44 2010
@@ -56,9 +56,9 @@ options {
   JDK_VERSION = "1.6";
 }
 
-PARSER_BEGIN(GenAvro)
+PARSER_BEGIN(Idl)
 
-package org.apache.avro.genavro;
+package org.apache.avro.idl;
 
 import java.io.*;
 import java.util.ArrayList;
@@ -80,13 +80,13 @@ import org.apache.commons.lang.StringEsc
  * Note: each instance is not thread-safe, but multiple separate
  * instances are safely independent.
  */
-public class GenAvro
+public class Idl
 {
   String namespace;
   Map<String,Schema> names = new LinkedHashMap<String,Schema>();
 }
 
-PARSER_END(GenAvro)
+PARSER_END(Idl)
 
 /* WHITE SPACE */
 
@@ -894,11 +894,11 @@ TOKEN :
 
 
 /********************************************
- * THE GENAVRO LANGUAGE GRAMMAR STARTS HERE *
+ * THE AVRO IDL LANGUAGE GRAMMAR STARTS HERE *
  ********************************************/
 
 /**
- * The input to genavro is a CompilationUnit, which is currently
+ * The input to Idl is a CompilationUnit, which is currently
  * just a single Protocol.
  */
 Protocol CompilationUnit():

Copied: avro/trunk/lang/java/src/java/org/apache/avro/tool/IdlTool.java (from r955435, avro/trunk/lang/java/src/java/org/apache/avro/tool/GenAvroTool.java)
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/src/java/org/apache/avro/tool/IdlTool.java?p2=avro/trunk/lang/java/src/java/org/apache/avro/tool/IdlTool.java&p1=avro/trunk/lang/java/src/java/org/apache/avro/tool/GenAvroTool.java&r1=955435&r2=956103&rev=956103&view=diff
==============================================================================
--- avro/trunk/lang/java/src/java/org/apache/avro/tool/GenAvroTool.java (original)
+++ avro/trunk/lang/java/src/java/org/apache/avro/tool/IdlTool.java Fri Jun 18 19:18:44 2010
@@ -19,7 +19,7 @@
 package org.apache.avro.tool;
 
 import org.apache.avro.Protocol;
-import org.apache.avro.genavro.GenAvro;
+import org.apache.avro.idl.Idl;
 
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -29,9 +29,9 @@ import java.util.List;
 
 /**
  * Tool implementation for generating Avro JSON schemata from
- * genavro format files.
+ * idl format files.
  */
-public class GenAvroTool implements Tool {
+public class IdlTool implements Tool {
   @Override
   public int run(InputStream in, PrintStream out, PrintStream err,
                   List<String> args) throws Exception {
@@ -42,7 +42,7 @@ public class GenAvroTool implements Tool
     if (args.size() > 2 ||
         (args.size() == 1 && (args.get(0).equals("--help") ||
                               args.get(0).equals("-help")))) {
-      err.println("Usage: GenAvroTool [in] [out]");
+      err.println("Usage: idl [in] [out]");
       err.println("");
       err.println("If an output path is not specified, outputs to stdout.");
       err.println("If no input or output is specified, takes input from");
@@ -60,7 +60,7 @@ public class GenAvroTool implements Tool
     }
 
 
-    GenAvro parser = new GenAvro(parseIn);
+    Idl parser = new Idl(parseIn);
     Protocol p = parser.CompilationUnit();
     parseOut.print(p.toString(true));
     return 0;
@@ -68,11 +68,11 @@ public class GenAvroTool implements Tool
 
   @Override
   public String getName() {
-    return "genavro";
+    return "idl";
   }
 
   @Override
   public String getShortDescription() {
-    return "Generates a JSON schema from a GenAvro file";
+    return "Generates a JSON schema from an Avro IDL file";
   }
 }

Modified: avro/trunk/lang/java/src/java/org/apache/avro/tool/Main.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/src/java/org/apache/avro/tool/Main.java?rev=956103&r1=956102&r2=956103&view=diff
==============================================================================
--- avro/trunk/lang/java/src/java/org/apache/avro/tool/Main.java (original)
+++ avro/trunk/lang/java/src/java/org/apache/avro/tool/Main.java Fri Jun 18 19:18:44 2010
@@ -46,7 +46,7 @@ public class Main {
         new DataFileReadTool(),
         new DataFileWriteTool(),
         new DataFileGetSchemaTool(),
-        new GenAvroTool(),
+        new IdlTool(),
         new RpcReceiveTool(),
         new RpcSendTool(),
         new FromTextTool(),

Copied: avro/trunk/lang/java/src/test/java/org/apache/avro/idl/TestIdl.java (from r955435,
avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java)
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/src/test/java/org/apache/avro/idl/TestIdl.java?p2=avro/trunk/lang/java/src/test/java/org/apache/avro/idl/TestIdl.java&p1=avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java&r1=955435&r2=956103&rev=956103&view=diff
==============================================================================
--- avro/trunk/lang/java/src/test/java/org/apache/avro/genavro/TestGenAvro.java (original)
+++ avro/trunk/lang/java/src/test/java/org/apache/avro/idl/TestIdl.java Fri Jun 18 19:18:44
2010
@@ -16,7 +16,7 @@
  * limitations under the License.
  */
 
-package org.apache.avro.genavro;
+package org.apache.avro.idl;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -34,20 +34,20 @@ import java.io.InputStreamReader;
 import org.apache.avro.Protocol;
 
 /**
- * Simple test harness for GenAvro.
+ * Simple test harness for Idl.
  * This relies on an input/ and output/ directory. Inside
- * the input/ directory are .genavro files. Each file should have
+ * the input/ directory are .avdl files. Each file should have
  * a corresponding .avpr file in output/. When the test is run,
- * it generates and stringifies each .genavro file and compares
+ * it generates and stringifies each .avdl file and compares
  * it to the expected output, failing if the two differ.
  *
  * To make it simpler to write these tests, you can run
- *   ant -Dtestcase=TestGenAvro -Dtest.genavro.mode=write
+ *   ant -Dtestcase=TestIdl -Dtest.idl.mode=write
  * which will *replace* all expected output.
  */
-public class TestGenAvro {
+public class TestIdl {
   private static final File TEST_DIR =
-    new File(System.getProperty("test.genavro.dir"));
+    new File(System.getProperty("test.idl.dir"));
 
   private static final File TEST_INPUT_DIR =
     new File(TEST_DIR, "input");
@@ -56,7 +56,7 @@ public class TestGenAvro {
     new File(TEST_DIR, "output");
 
   private static final String TEST_MODE =
-    System.getProperty("test.genavro.mode", "run");
+    System.getProperty("test.idl.mode", "run");
 
   private List<GenTest> tests;
 
@@ -68,12 +68,12 @@ public class TestGenAvro {
 
     tests = new ArrayList<GenTest>();
     for (File inF : TEST_INPUT_DIR.listFiles()) {
-      if (!inF.getName().endsWith(".genavro")) continue;
+      if (!inF.getName().endsWith(".avdl")) continue;
       if (inF.getName().startsWith(".")) continue;
 
       File outF = new File(
         TEST_OUTPUT_DIR,
-        inF.getName().replaceFirst("\\.genavro$", ".avpr"));
+        inF.getName().replaceFirst("\\.avdl$", ".avpr"));
       tests.add(new GenTest(inF, outF));
     }
   }
@@ -121,7 +121,7 @@ public class TestGenAvro {
     }
 
     private String generate() throws Exception {
-      GenAvro parser = new GenAvro(new FileInputStream(in), "UTF-8");
+      Idl parser = new Idl(new FileInputStream(in), "UTF-8");
       Protocol p = parser.CompilationUnit();
       return p.toString(true);
     }



Mime
View raw message