From: Thomas G. Lockhart Date: Sat, 13 Sep 1997 03:20:18 +0000 (+0000) Subject: Add tests for unary minus. X-Git-Tag: REL6_2~196 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05428ada1d0e6f8c9d34f9e926a0fbdbc1d03817;p=postgresql Add tests for unary minus. --- diff --git a/src/test/regress/expected/int4.out b/src/test/regress/expected/int4.out index ed3b9f2d09..5abaae1455 100644 --- a/src/test/regress/expected/int4.out +++ b/src/test/regress/expected/int4.out @@ -204,6 +204,30 @@ five| f1| x |-2147483647|-1073741823 (5 rows) +QUERY: SELECT -2+3 AS one; +one +--- + 1 +(1 row) + +QUERY: SELECT 4-2 AS two; +two +--- + 2 +(1 row) + +QUERY: SELECT 2- -1 AS three; +three +----- + 3 +(1 row) + +QUERY: SELECT 2 - -2 AS four; +four +---- + 4 +(1 row) + QUERY: SELECT '2'::int2 * '2'::int2 = '16'::int2 / '4'::int2 AS true; true ----