Skip to content

Commit

Permalink
Add test cases and fix typo
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ShreyasKhandekar committed Aug 23, 2023
1 parent 62f70b1 commit ecb91ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/internal/ChapelRange.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions test/types/range/unbounded/compareEnumBool.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -41,4 +43,6 @@ writeln(ddt == dd);
writeln(negft == negfdd);
writeln(negfdd == negddt);
writeln(negfdd == dd);
writeln(fdd == negfdd);
writeln(ddt == negddt);
}
4 changes: 4 additions & 0 deletions test/types/range/unbounded/compareEnumBool.good
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ true
true
true
false
false
false
true
true
true
Expand All @@ -16,3 +18,5 @@ true
true
true
false
false
false

0 comments on commit ecb91ec

Please sign in to comment.