[svn:parrot] r49251 - trunk/t/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Wed Sep 22 22:26:42 UTC 2010
Author: NotFound
Date: Wed Sep 22 22:26:42 2010
New Revision: 49251
URL: https://trac.parrot.org/parrot/changeset/49251
Log:
fix ByteBuffer tests that were passing for wrong reasons
Modified:
trunk/t/pmc/bytebuffer.t
Modified: trunk/t/pmc/bytebuffer.t
==============================================================================
--- trunk/t/pmc/bytebuffer.t Wed Sep 22 21:16:26 2010 (r49250)
+++ trunk/t/pmc/bytebuffer.t Wed Sep 22 22:26:42 2010 (r49251)
@@ -349,12 +349,14 @@
.end
.sub test_invalid
- .local pmc bb, ex
+ .local pmc bb, eh, ex
.local string s
+ eh = new ['ExceptionHandler'], .EXCEPTION_INVALID_ENCODING
+ set_addr eh, catch_encoding
+ push_eh eh
bb = new ['ByteBuffer']
bb = 'something'
- push_eh catch_encoding
- s = bb.'get_string'('ascii', '???INVALID eNCODING===')
+ s = bb.'get_string'('???INVALID eNCODING===')
pop_eh
ok(0, "get_string with invalid encoding should throw")
goto check_content
@@ -365,8 +367,10 @@
ok(1, "get_string with invalid encoding throws")
check_content:
bb[0] = 128 # Out of ascii range
- push_eh catch_content
- s = bb.'get_string'('ascii', 'fixed_8')
+ eh = new ['ExceptionHandler'], .EXCEPTION_INVALID_STRING_REPRESENTATION
+ set_addr eh, catch_content
+ push_eh eh
+ s = bb.'get_string'('ascii')
pop_eh
ok(0, "get_string with invalid content should throw")
goto end
More information about the parrot-commits
mailing list