diff options
author | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-11-07 19:39:21 +0000 |
---|---|---|
committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2020-11-07 19:39:21 +0000 |
commit | 302da1a3d35c15cb29d76e0a939f8bcb13f7ad80 (patch) | |
tree | c2146dca82d530521c4d2cc46a95c26964311a2c /unit-tests/cond-cmp-numeric-ne.mk | |
parent | 6bbc783f48498b808e19db4441299dc7d85a278b (diff) | |
download | src-302da1a3d35c15cb29d76e0a939f8bcb13f7ad80.tar.gz src-302da1a3d35c15cb29d76e0a939f8bcb13f7ad80.zip |
Notes
Diffstat (limited to 'unit-tests/cond-cmp-numeric-ne.mk')
-rwxr-xr-x | unit-tests/cond-cmp-numeric-ne.mk | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/unit-tests/cond-cmp-numeric-ne.mk b/unit-tests/cond-cmp-numeric-ne.mk index 6f858584d139..0a366a905a21 100755 --- a/unit-tests/cond-cmp-numeric-ne.mk +++ b/unit-tests/cond-cmp-numeric-ne.mk @@ -1,40 +1,40 @@ -# $NetBSD: cond-cmp-numeric-ne.mk,v 1.1 2020/08/23 13:50:17 rillig Exp $ +# $NetBSD: cond-cmp-numeric-ne.mk,v 1.2 2020/10/24 08:46:08 rillig Exp $ # # Tests for numeric comparisons with the != operator in .if conditions. # When both sides are equal, the != operator always yields false. .if 1 != 1 -.error +. error .endif # This comparison yields the same result, whether numeric or character-based. .if 1 != 2 .else -.error +. error .endif .if 2 != 1 .else -.error +. error .endif # Scientific notation is supported, as per strtod. .if 2e7 != 2000e4 -.error +. error .endif .if 2000e4 != 2e7 -.error +. error .endif # Trailing zeroes after the decimal point are irrelevant for the numeric # value. .if 3.30000 != 3.3 -.error +. error .endif .if 3.3 != 3.30000 -.error +. error .endif # As of 2020-08-23, numeric comparison is implemented as parsing both sides @@ -42,7 +42,7 @@ # typically 16 or 17 significant digits, therefore these two numbers seem to # be equal. .if 1.000000000000000001 != 1.000000000000000002 -.error +. error .endif all: |