-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conform to bestpractice to call channel
stdout
- Loading branch information
1 parent
5786c96
commit 2257d7a
Showing
4 changed files
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,28 +1,28 @@ | |||
new lCh, print(`rho:io:stdout`) in { | new lCh, stdout(`rho:io:stdout`) in { | ||
|
|
||
// Make a new list, l | // Make a new list, l | ||
lCh!!([3, 4, 5])| | lCh!!([3, 4, 5])| | ||
|
|
||
// Test nth | // Test nth | ||
for (@l <- lCh){ | for (@l <- lCh){ | ||
print!("Test nth. Expected: 5. Got: ${ans}" %% {"ans": l.nth(2)}) | stdout!("Test nth. Expected: 5. Got: ${ans}" %% {"ans": l.nth(2)}) | ||
} | } | ||
| | | | ||
|
|
||
// Test toByteArray | // Test toByteArray | ||
for (@l <- lCh){ | for (@l <- lCh){ | ||
print!(["Test toByteArray. Got: ", l.toByteArray()]) | stdout!(["Test toByteArray. Got: ", l.toByteArray()]) | ||
} | } | ||
| | | | ||
|
|
||
// Test slice | // Test slice | ||
for (@l <- lCh){ | for (@l <- lCh){ | ||
print!(["Test slice. Expected: [4, 5]. Got: ", l.slice(1, 3)]) | stdout!(["Test slice. Expected: [4, 5]. Got: ", l.slice(1, 3)]) | ||
} | } | ||
| | | | ||
|
|
||
// Test length | // Test length | ||
for (@l <- lCh){ | for (@l <- lCh){ | ||
print!("Test length. Expected: 3. Got: '${ans}" %% {"ans": l.length()}) | stdout!("Test length. Expected: 3. Got: '${ans}" %% {"ans": l.length()}) | ||
} | } | ||
} | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,46 +1,46 @@ | |||
new sCh, print(`rho:io:stdout`) in { | new sCh, stdout(`rho:io:stdout`) in { | ||
|
|
||
sCh!!(Set(3, 4, 5))| | sCh!!(Set(3, 4, 5))| | ||
|
|
||
// Test toByteArray | // Test toByteArray | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!(["Test toByteArray. Got: ", s.toByteArray()]) | stdout!(["Test toByteArray. Got: ", s.toByteArray()]) | ||
} | } | ||
| | | | ||
|
|
||
// Test Add | // Test Add | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!(["Test add. Expected Set(3, 4, 5, 6), Got: ", s.add(6)]) | stdout!(["Test add. Expected Set(3, 4, 5, 6), Got: ", s.add(6)]) | ||
} | } | ||
| | | | ||
|
|
||
// Test Diff | // Test Diff | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!(["Test diff. Expected: Set(5) Got: ", s.diff(Set(3, 4))]) | stdout!(["Test diff. Expected: Set(5) Got: ", s.diff(Set(3, 4))]) | ||
} | } | ||
| | | | ||
|
|
||
// Test Union | // Test Union | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!(["Test union. Expected: Set(1, 2, 3, 4, 5). Got: ", s.union(Set(1, 2))]) | stdout!(["Test union. Expected: Set(1, 2, 3, 4, 5). Got: ", s.union(Set(1, 2))]) | ||
} | } | ||
| | | | ||
|
|
||
// Test Delete | // Test Delete | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!(["Test delete. Expected: Set(3, 4). Got: ", s.delete(5)]) | stdout!(["Test delete. Expected: Set(3, 4). Got: ", s.delete(5)]) | ||
} | } | ||
| | | | ||
|
|
||
// Test Contains | // Test Contains | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!(["Test contains. Expected: true. Got:", s.contains(5)])| | stdout!(["Test contains. Expected: true. Got:", s.contains(5)])| | ||
print!(["Test contains. Expected: false. Got: ", s.contains(6)]) | stdout!(["Test contains. Expected: false. Got: ", s.contains(6)]) | ||
} | } | ||
| | | | ||
|
|
||
// Test Size | // Test Size | ||
for (@s <- sCh){ | for (@s <- sCh){ | ||
print!("Test size. Expected 3. Got: ${ans}" %% {"ans": s.size()}) | stdout!("Test size. Expected 3. Got: ${ans}" %% {"ans": s.size()}) | ||
} | } | ||
} | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters