PageRenderTime 25ms CodeModel.GetById 19ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/test/lib/string/test_string17.e

http://github.com/tybor/Liberty
Specman e | 28 lines | 22 code | 3 blank | 3 comment | 0 complexity | d84e1b896d81f950c639f23c838b42fd MD5 | raw file
 1class TEST_STRING17
 2   -- Test append after removing a charater at beginning and at the end of the string
 3insert EIFFELTEST_TOOLS
 4
 5create {}
 6   make
 7
 8feature {}
 9   make
10      do
11         foo("-123456-","78")
12      end
13
14   foo (a,b: ABSTRACT_STRING)
15      local x: STRING; l,m: INTEGER_32
16      do
17         l := a.count; m:= b.count
18         create x.make_from_string(a)
19         assert(x.count=l)
20         x.remove_first
21         assert(x.count=l-1)
22         --x.remove_last
23         --assert(x.count=l-1)
24         x.append(b)
25         print("'"+x+"' is "+x.count.to_string+" characters long%N")
26         assert(x.count = l-1+m)
27      end
28end