From 72be68d0e0b5aefe462ef23082263db63bde4220 Mon Sep 17 00:00:00 2001 From: Andy Cedilnik Date: Mon, 17 Mar 2003 14:29:22 -0500 Subject: Improve test --- Tests/Simple/CMakeLists.txt | 3 ++- Tests/Simple/simple.cxx | 5 +++++ Tests/Simple/simpleCLib.c | 1 + Tests/Simple/simpleWe.cpp | 16 ++++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 Tests/Simple/simpleWe.cpp diff --git a/Tests/Simple/CMakeLists.txt b/Tests/Simple/CMakeLists.txt index 07a9039..810f05d 100644 --- a/Tests/Simple/CMakeLists.txt +++ b/Tests/Simple/CMakeLists.txt @@ -1,5 +1,6 @@ # a simple test case PROJECT (simple) ADD_EXECUTABLE (simple simple.cxx) -ADD_LIBRARY(simpleLib STATIC simpleLib.cxx simpleCLib.c) +ADD_LIBRARY(simpleLib STATIC + simpleLib.cxx simpleCLib.c simpleWe.cpp) TARGET_LINK_LIBRARIES(simple simpleLib) diff --git a/Tests/Simple/simple.cxx b/Tests/Simple/simple.cxx index ef26e79..7bee7c0 100644 --- a/Tests/Simple/simple.cxx +++ b/Tests/Simple/simple.cxx @@ -1,6 +1,11 @@ extern void simpleLib(); +extern "C" int FooBar(); +extern int bar(); +extern int bar1(); int main () { + FooBar(); + bar(); simpleLib(); return 0; } diff --git a/Tests/Simple/simpleCLib.c b/Tests/Simple/simpleCLib.c index f1c5ac2..88fc33e 100644 --- a/Tests/Simple/simpleCLib.c +++ b/Tests/Simple/simpleCLib.c @@ -8,4 +8,5 @@ int FooBar() { printf("Count: %d/%d\n", class, private); } + return 0; } diff --git a/Tests/Simple/simpleWe.cpp b/Tests/Simple/simpleWe.cpp new file mode 100644 index 0000000..6bdd583 --- /dev/null +++ b/Tests/Simple/simpleWe.cpp @@ -0,0 +1,16 @@ +#include + +class Foo +{ +public: + Foo() + { + printf("This one has nonstandard extension\n"); + } +}; + +int bar() +{ + Foo f; + return 0; +} -- cgit v0.12