Skip to content

Commit

Permalink
Adding tests for deprecated features
Browse files Browse the repository at this point in the history
Signed-off-by: Shreyas Khandekar <[email protected]>
  • Loading branch information
ShreyasKhandekar committed Jul 28, 2023
1 parent 043a63d commit 2271797
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/deprecated/rangeDomainDeprecations.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const r1 = 1..4;
const r2 = 1..4;
const r3 = ..;
const idx = 3;

// Testing 3 overloads of boundsCheck
r1.boundsCheck(idx);
r1.boundsCheck(r2);
r1.boundsCheck(r3);

// Testing assignment between unbounded ranges
const r4: range(bool, boundKind.neither) = r3;
const r5: range(bool, boundKind.neither, strides = strideKind.any) = .. by 2;

// Testing .dist deprecation
const d1 = {1..idx, 1..idx};
d1.dist;
const d2 = {1..idx, 1..idx, idx..idx};
d2.dist;
7 changes: 7 additions & 0 deletions test/deprecated/rangeDomainDeprecations.good
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rangeDomainDeprecations.chpl:7: warning: range.boundsCheck() is deprecated, please use range.contains() instead
rangeDomainDeprecations.chpl:8: warning: range.boundsCheck() is deprecated, consider using range.contains() instead
rangeDomainDeprecations.chpl:9: warning: range.boundsCheck() is deprecated, consider using range.contains() instead
rangeDomainDeprecations.chpl:12: warning: initializing an unbounded range with idxType bool from an unbounded range with idxType int(64) is deprecated
rangeDomainDeprecations.chpl:13: warning: initializing an unbounded range with idxType bool from an unbounded range with idxType int(64) is deprecated
rangeDomainDeprecations.chpl:17: warning: domain.dist is deprecated, please use domain.distribution instead
rangeDomainDeprecations.chpl:19: warning: domain.dist is deprecated, please use domain.distribution instead

0 comments on commit 2271797

Please sign in to comment.