/src/wrappers/glib/test/test_g_string00.e

http://github.com/tybor/Liberty · Specman e · 38 lines · 28 code · 10 blank · 0 comment · 0 complexity · 139471cd3e1f4e2ffdf6cc565ff46538 MD5 · raw file

  1. class TEST_G_STRING00
  2. inherit
  3. EIFFELTEST_TOOLS
  4. creation
  5. make
  6. feature
  7. make is
  8. local
  9. s: G_STRING
  10. s2: G_STRING
  11. c: CHARACTER
  12. do
  13. create s.make(10)
  14. assert(s.count = 0)
  15. from
  16. c := 'a'
  17. until
  18. c > 'j'
  19. loop
  20. s.add_last(c)
  21. c := c.next
  22. end
  23. assert(s.count = 10)
  24. create s2.from_string("abcdefghij")
  25. assert(s.is_equal(s2))
  26. assert(s.to_string.is_equal("abcdefghij"))
  27. end
  28. end -- GLIST_TEST00