Skip to content

Commit 7e46f80

Browse files
committed
test: add a syntax parse round-trip test
1 parent 3b715da commit 7e46f80

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lit_tests/print_verify_tree.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %lit-test-helper -print-tree -source-file %s > %t.result
3+
// RUN: diff -u %t.result %s
4+
5+
func foo() {
6+
#if swift(>=3.2)
7+
components.append("-b \"\(string[..<string.index(before: string.endIndex)])\"")
8+
#else
9+
components.append("-b \"\(string.substring(to: string.characters.index(before: string.endIndex)))\"")
10+
#endif
11+
}

0 commit comments

Comments
 (0)