Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Go to:
note description: "Summary description for {TESTS}." author: "" date: "$Date$" revision: "$Revision$" class TESTS inherit ES_TEST create make feature {NONE} -- Initialization make -- Initialization for `Current'. do add_boolean_case (agent t0) end feature -- tests t0: BOOLEAN local s1, s2, s1_old: SEQ [INTEGER_32] a1, a2: ARRAY [INTEGER_32] do comment ("t0: basic tests SEQ[INTEGER] expanded uses =") a1 := << 8, 4, 6, 2 >> a2 := << 4, 6, 2 >> create s1.make_from_array (a1) create s2.make_from_array (a2) create s1_old.make_from_array (a1) assert ("empty", not s1.is_empty, s1) Result := s1.count = 4 and s1.first = 8 and s1.last = 2 check Result end assert_equal ("tail", s1.tail, s2) Result := s1.tail /= s2 and s1.tail ~ s2 check Result end s2 := s1 |<- 10 assert_equal ("prepended", s2.first = 10 and s2.tail ~ s1, True) s2 := s1 |-> 0 assert_equal ("appended", s2.last, 0) assert_equal ("appended", s2.first, 8) assert_equal ("s1 unchanged", s1, s1_old) end t1: BOOLEAN local s1, s2, s1_old: SEQ [STRING_8] a1, a2: ARRAY [STRING_8] do comment ("t1: basic tests SEQ[STRING] reference requires ~") a1 := << "8", "4", "6", "2" >> a2 := << "4", "6", "2" >> create s1.make_from_array (a1) create s2.make_from_array (a2) create s1_old.make_from_array (a1) assert ("empty", not s1.is_empty, s1) Result := s1.count = 4 and s1.first ~ "8" and s1.last ~ "2" check Result end assert_equal ("tail", s1.tail, s2) Result := s1.tail /= s2 and s1.tail ~ s2 check Result end s2 := s1 |<- "10" assert_equal ("prepended", s2.first ~ "10" and s2.tail ~ s1, True) s2 := s1 |-> "0" assert_equal ("appended", s2.last, "0") assert_equal ("appended", s2.first, "8") assert_equal ("s1 unchanged", s1, s1_old) end end -- class TESTS
Classes Clusters Cluster hierarchy Chart Relations Text Flat Contracts Go to:

-- Generated by ISE Eiffel --
For more details: www.eiffel.com