[pypy-commit] lang-smalltalk default: added two test cases which fail with the closure-image

lwassermann noreply at buildbot.pypy.org
Mon Feb 25 17:59:32 CET 2013


Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch: 
Changeset: r99:584072599dfd
Date: 2013-02-25 17:59 +0100
http://bitbucket.org/pypy/lang-smalltalk/changeset/584072599dfd/

Log:	added two test cases which fail with the closure-image

diff --git a/spyvm/test/test_bootstrappedimage.py b/spyvm/test/test_bootstrappedimage.py
new file mode 100644
--- /dev/null
+++ b/spyvm/test/test_bootstrappedimage.py
@@ -0,0 +1,26 @@
+import py
+from spyvm import squeakimage, model, constants
+from spyvm import interpreter, shadow, objspace
+from spyvm.test import test_miniimage as testhelper
+from spyvm.test.test_miniimage import perform, w
+
+testhelper.setup_module(testhelper, filename='bootstrapped.image')
+
+def test_retrieve_symbol():
+    py.test.skip("This method will fail, because the bytecodes are not adjusted for blockclosures, yet.")
+    perform(testhelper.image.w_asSymbol, "asSymbol")
+
+def test_create_new_symbol():
+    py.test.skip("This method is based upon the above.")
+    #import pdb; pdb.set_trace()
+    w_result = perform(w("someString"), "asSymbol")
+    assert w_result is not None
+    assert w_result.as_string() is "someString"
+    
+
+#def test_hazelnut():
+#    from spyvm.test import test_miniimage
+#    setup_module(test_miniimage, filename='bootstrapped.image')
+#    test_miniimage.test_all_pointers_are_valid()
+#    test_miniimage.test_become()
+    #test_miniimage.test_special_classes0()
diff --git a/spyvm/test/test_miniimage.py b/spyvm/test/test_miniimage.py
--- a/spyvm/test/test_miniimage.py
+++ b/spyvm/test/test_miniimage.py
@@ -301,3 +301,8 @@
     assert s_ctx.top().value == 2
     interp.step(s_ctx)
     assert s_ctx.top().value == 3
+
+def test_create_new_symbol():
+    w_result = perform(w("someString"), "asSymbol")
+    assert w_result is not None
+    assert w_result.as_string() == "someString"


More information about the pypy-commit mailing list