/src/wrappers/common/test/test_natural3.e

http://github.com/tybor/Liberty · Specman e · 38 lines · 15 code · 8 blank · 15 comment · 0 complexity · 96dbd9c7936a72503552520779420b27 MD5 · raw file

  1. class TEST_NATURAL3
  2. inherit
  3. EIFFELTEST_TOOLS
  4. create {ANY}
  5. make
  6. feature {ANY}
  7. make
  8. local
  9. n0: NATURAL_8
  10. do
  11. n0.make_from_signed(4)
  12. assert(n0.one + n0.one + n0.one + n0.one = n0)
  13. assert(n0 + n0.zero = n0)
  14. end
  15. end -- class TEST_NATURAL3
  16. -- Copyright (C) 2009-2017: , 2013 Paolo Redaelli, 2013 Cyril Adrian
  17. -- This library is free software; you can redistribute it and/or
  18. -- modify it under the terms of the GNU Lesser General Public License
  19. -- as published by the Free Software Foundation; either version 2.1 of
  20. -- the License, or (at your option) any later version.
  21. --
  22. -- This library is distributed in the hope that it will be useful, but
  23. -- WITHOUT ANY WARRANTY; without even the implied warranty of
  24. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  25. -- Lesser General Public License for more details.
  26. --
  27. -- You should have received a copy of the GNU Lesser General Public
  28. -- License along with this library; if not, write to the Free Software
  29. -- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  30. -- 02110-1301 USA