PageRenderTime 17ms CodeModel.GetById 12ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/test/lib/string/test_fixed_substring.e

http://github.com/tybor/Liberty
Specman e | 28 lines | 23 code | 5 blank | 0 comment | 0 complexity | d053b7d8bb4d9dd1224efd7e43087a7d MD5 | raw file
 1class TEST_FIXED_SUBSTRING
 2
 3insert
 4   EIFFELTEST_TOOLS
 5   STRING_HANDLER
 6
 7create {}
 8   make
 9
10feature {ANY}
11   make
12      do
13         fixed := source.intern
14         substring := fixed.substring(8, 13)
15         assert("string".is_equal(substring))
16         subsubstring := substring.substring(1, 3)
17         assert("str".is_equal(subsubstring))
18         subsubstring.unshare
19         assert("string".is_equal(substring))
20         assert("str".is_equal(subsubstring))
21      end
22
23   source: STRING "Source string...."
24   fixed: FIXED_STRING
25   substring: FIXED_STRING
26   subsubstring: FIXED_STRING
27
28end -- class TEST_FIXED_SUBSTRING