[svn:parrot] r38007 - branches/packfile_revamp/t/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Fri Apr 10 05:29:37 UTC 2009
Author: bacek
Date: Fri Apr 10 05:29:36 2009
New Revision: 38007
URL: https://trac.parrot.org/parrot/changeset/38007
Log:
Add tests for Packfile unpacking.
Modified:
branches/packfile_revamp/t/pmc/packfile.t
Modified: branches/packfile_revamp/t/pmc/packfile.t
==============================================================================
--- branches/packfile_revamp/t/pmc/packfile.t Fri Apr 10 05:29:19 2009 (r38006)
+++ branches/packfile_revamp/t/pmc/packfile.t Fri Apr 10 05:29:36 2009 (r38007)
@@ -21,13 +21,14 @@
.sub main :main
.include 'test_more.pir'
- plan(12)
+ plan(15)
'test_new'()
'test_get_string'()
'test_set_string'()
'test_get_integer'()
'test_set_integer'()
'test_get_directory'()
+ 'test_load'()
'test_pack'()
# This test will crash on many platforms. See TT#545.
#'test_synonyms'()
@@ -146,6 +147,25 @@
ok($I1, 'get_directory')
.end
+
+# Packfile.set_string_native
+# Check that packfile was loaded properly and set various attributes
+.sub 'test_load'
+ .local pmc pf
+ pf = _pbc()
+
+ # wordsize always greater than 0
+ $I0 = pf["wordsize"]
+ ok($I0, "Wordsize set")
+
+ # We are living in post-1.0 era.
+ $I0 = pf["version_major"]
+ ok($I0, "version_major set")
+
+ $I0 = pf["bytecode_major"]
+ ok($I0, "bytecode_major set")
+.end
+
# Packfile.pack.
# Check that unpack-pack produce correct result.
.sub 'test_pack'
More information about the parrot-commits
mailing list