/test/lib/numeric/integer/test_integer_range.e
http://github.com/tybor/Liberty · Specman e · 23 lines · 18 code · 5 blank · 0 comment · 0 complexity · d605497806f7097cbd23598e3a075a41 MD5 · raw file
- class TEST_INTEGER_RANGE
- insert
- EIFFELTEST_TOOLS
- create {}
- make
- feature {}
- make
- local
- sum: INTEGER
- do
- sum := ({INTEGER 1} |..| {INTEGER 1000}).aggregate(agent add(?,?), 0)
- assert(sum = (1000*1001)//2)
- end
- add (a, b: INTEGER): INTEGER
- do
- Result := a + b
- end
- end