[svn:parrot] r46335 - trunk/t/pmc

bacek at svn.parrot.org bacek at svn.parrot.org
Thu May 6 12:03:21 UTC 2010


Author: bacek
Date: Thu May  6 12:03:21 2010
New Revision: 46335
URL: https://trac.parrot.org/parrot/changeset/46335

Log:
Add initial tests for StringBuilder.

Added:
   trunk/t/pmc/stringbuilder.t

Added: trunk/t/pmc/stringbuilder.t
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/t/pmc/stringbuilder.t	Thu May  6 12:03:21 2010	(r46335)
@@ -0,0 +1,47 @@
+#!./parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+t/pmc/stringbuilder.t - StringBuilder
+
+=head1 SYNOPSIS
+
+    % prove t/pmc/stringbuilder.t
+
+=head1 DESCRIPTION
+
+Tests the C<StringBuilder> PMC.
+
+=cut
+
+
+.sub 'main' :main
+    .include 'test_more.pir'
+
+    plan(2)
+    test_create()       # 2 tests
+
+    # END_OF_TESTS
+.end
+
+.sub 'test_create'
+    .local pmc sb
+    sb = new ['StringBuilder']
+
+    $I0 = isnull sb
+    not $I0
+    ok( $I0, 'StringBuilder created' )
+
+    $S0 = sb
+    is( $S0, '', '... with empty content')
+
+.end
+
+# Local Variables:
+#   mode: pir
+#   fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
+


More information about the parrot-commits mailing list