diff options
Diffstat (limited to 'test cases/swift/10 mixed cpp/mylib.cpp')
-rw-r--r-- | test cases/swift/10 mixed cpp/mylib.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test cases/swift/10 mixed cpp/mylib.cpp b/test cases/swift/10 mixed cpp/mylib.cpp new file mode 100644 index 0000000..0c61681 --- /dev/null +++ b/test cases/swift/10 mixed cpp/mylib.cpp @@ -0,0 +1,22 @@ +#include "mylib.h" +#include <iostream> + +Test::Test() { + std::cout << "Test initialized" << std::endl; +} + +Test::Test(int param) { + std::cout << "Test initialized with param " << param << std::endl; +} + +void Test::testCallFromClass() { + std::cout << "Calling C++ class function from Swift is working" << std::endl; +} + +void testCallFromSwift() { + std::cout << "Calling this C++ function from Swift is working" << std::endl; +} + +void testCallWithParam(const std::string ¶m) { + std::cout << param << std::endl; +} |