From ecb91ec78f03a8adf7bcfe4c0b63fd16bd137899 Mon Sep 17 00:00:00 2001 From: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> Date: Tue, 22 Aug 2023 19:09:59 -0500 Subject: [PATCH] Add test cases and fix typo Add two more test cases each for enums and bools And fix a small type in ChapelRange Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- modules/internal/ChapelRange.chpl | 2 +- test/types/range/unbounded/compareEnumBool.chpl | 4 ++++ test/types/range/unbounded/compareEnumBool.good | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/internal/ChapelRange.chpl b/modules/internal/ChapelRange.chpl index a51b0f3030a2..620ea1a45391 100644 --- a/modules/internal/ChapelRange.chpl +++ b/modules/internal/ChapelRange.chpl @@ -1590,7 +1590,7 @@ module ChapelRange { { if r1._low != r2._low then return false; if r1._high != r2._high then return false; - // the following can be 'if none == none ...' + // the following can be 'if none != none ...' if r1._stride != r2._stride then return false; if r1._alignment != r2._alignment then return false; return true; diff --git a/test/types/range/unbounded/compareEnumBool.chpl b/test/types/range/unbounded/compareEnumBool.chpl index e06b6ca0be81..540ca47a8ed8 100644 --- a/test/types/range/unbounded/compareEnumBool.chpl +++ b/test/types/range/unbounded/compareEnumBool.chpl @@ -20,6 +20,8 @@ writeln(ddb == dd); writeln(negrgb == negrdd); writeln(negrdd == negddb); writeln(negrdd == dd); +writeln(rdd == negrdd); +writeln(ddb == negddb); { var ft = false..true; @@ -41,4 +43,6 @@ writeln(ddt == dd); writeln(negft == negfdd); writeln(negfdd == negddt); writeln(negfdd == dd); +writeln(fdd == negfdd); +writeln(ddt == negddt); } diff --git a/test/types/range/unbounded/compareEnumBool.good b/test/types/range/unbounded/compareEnumBool.good index b82a8c2d9b2b..d0920bee68a9 100644 --- a/test/types/range/unbounded/compareEnumBool.good +++ b/test/types/range/unbounded/compareEnumBool.good @@ -7,6 +7,8 @@ true true true false +false +false true true true @@ -16,3 +18,5 @@ true true true false +false +false