History

reverse feature and unit test + example

Andrew Aday committed 3 years ago

Commit e7ef3c81 parent 7686e906 files · +122 −0Browse files

Showing the changes to src/test (1 of 6 files). Show all

Unified · Split

src/test/01-Basic/126.ck+11−0
@@ -0,0 +1,11 @@
1+[1,2,3,4,5,6] @=> int a[];
2+[1,2,3,4,5,6] @=> int b[];
3+
4+b.reverse();
5+
6+// test b is the reverse of a
7+for (int i; i < a.size(); i++) {
8+ if (a[i] != b[-i-1]) me.exit();
9+}
10+
11+<<< "success" >>>;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t