Skip to content

Commit f8f8e16

Browse files
committed
Start with writing failing tests
1 parent 249ec7a commit f8f8e16

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/Interop/Cxx/class/method/Inputs/methods.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ struct HasMethods {
2525

2626
NonTrivialInWrapper nonConstPassThroughAsWrapper(int a) { return {a}; }
2727
NonTrivialInWrapper constPassThroughAsWrapper(int a) const { return {a}; }
28+
29+
int increment(int a) { return a + 1; }
30+
int increment(int a) const { return a + 1; }
2831
};
2932

3033
#endif // TEST_INTEROP_CXX_CLASS_METHOD_METHODS_H

test/Interop/Cxx/class/method/methods-module-interface.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@
1717

1818
// CHECK: mutating func nonConstPassThroughAsWrapper(_ a: Int32) -> NonTrivialInWrapper
1919
// CHECK: func constPassThroughAsWrapper(_ a: Int32) -> NonTrivialInWrapper
20+
21+
// CHECK: mutating func incrementMutable(_ a: Int32) -> Int32
22+
// CHECK: func incrementMutable(_ a: Int32) -> Int32
23+
24+
// CHECK: const func increment(_ a: Int32) -> Int32
25+
// CHECK: func increment(_ a: Int32) -> Int32

0 commit comments

Comments
 (0)