Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gnat.dg/test_rational_arithmetic.adb @ 143:76e1cf5455ef
add cbc_gc test
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 23 Dec 2018 19:24:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
-- { dg-do compile } with Rational_Arithmetic; use Rational_Arithmetic; procedure Test_Rational_Arithmetic is R: Rational := 10/2; B: Boolean := R = 5/1; -- RHS cannot be a Whole -- ("/" has been "undefined") C: Boolean := R = Rational' (5/1); D: Boolean := (6/3) = R; E: Boolean := (2/1 = 4/2); begin R := 1+1/(4/8); R := 2*(3/2)-(7/3)*3; end Test_Rational_Arithmetic;