diff paraspace/tests/injection_test.py @ 99:3898711adb2c

Make sure string data list is consistent. - Make sure string data list is uniquely - Name of inserted/injected class is also in the list.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 25 Jul 2011 21:53:33 +0800
parents c0c127c7b37e
children 355986e5cfbd
line wrap: on
line diff
--- a/paraspace/tests/injection_test.py	Mon Jul 25 20:37:32 2011 +0800
+++ b/paraspace/tests/injection_test.py	Mon Jul 25 21:53:33 2011 +0800
@@ -70,5 +70,11 @@
 
     classdata_map = _find_map(helloworld_unlinked, 0x2000)
     assert classdata_map.size == classdef_map.size
+
+    # Check strings
+    strdatas = helloworld_unlinked.stringDataItems.items
+    strs = sorted([strdata.data.data for strdata in strdatas])
+    assert len(strs) == len(set(strs)) # uniquely
+    assert 'Lcom/codemud/fakefile/fakefile;' in strs
     pass