src/doc: introduce option --no-render in HTML phase.
[nit.git] / tests / test_serialization.nit
index 1d3de0a..75c7a9d 100644 (file)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+#alt2#module test_serialization_alt2 is serialize
+
 import serialization
-import json_serialization
+import json::serialization
 
 # Simple class
 class A
-       auto_serializable
+       serialize
+#alt5# serialize
 
        var b = false
-       var c: Char
-       var f: Float
+       var c: Char#alt2#
+       #alt2#var c: Char is noserialize
+       var f: Float#alt4#
+       #alt4#var f: Float is serialize
        var i = 123
        var s = "asdf"
        var n: nullable Int
@@ -43,7 +48,9 @@ end
 
 # Sub-class of A
 class B
-       auto_serializable
+       auto_serializable#alt2##alt3#
+#alt2# noserialize
+#alt3# noserialize
        super A
 
        var ii: Int
@@ -97,6 +104,7 @@ d.d = d
 for o in new Array[Serializable].with_items(a, b, c, d) do
        var stream = new StringWriter
        var serializer = new JsonSerializer(stream)
+       #alt1#serializer.plain_json = true
        serializer.serialize(o)
 
        print "# Nit:\n{o}\n"