From e7a1b85f76b38fc8b6889752ca4b5625b05b0cbd Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Fri, 24 Aug 2007 10:39:51 -0400 Subject: [PATCH] ENH: add test for source_group Alex --- Tests/SourceGroups/CMakeLists.txt | 9 +++++++++ Tests/SourceGroups/bar.c | 4 ++++ Tests/SourceGroups/foo.c | 4 ++++ Tests/SourceGroups/main.c | 12 ++++++++++++ Tests/SourceGroups/sub1/foo.c | 4 ++++ Tests/SourceGroups/sub1/foobar.c | 4 ++++ 6 files changed, 37 insertions(+) create mode 100644 Tests/SourceGroups/CMakeLists.txt create mode 100644 Tests/SourceGroups/bar.c create mode 100644 Tests/SourceGroups/foo.c create mode 100644 Tests/SourceGroups/main.c create mode 100644 Tests/SourceGroups/sub1/foo.c create mode 100644 Tests/SourceGroups/sub1/foobar.c diff --git a/Tests/SourceGroups/CMakeLists.txt b/Tests/SourceGroups/CMakeLists.txt new file mode 100644 index 000000000..ab96baccc --- /dev/null +++ b/Tests/SourceGroups/CMakeLists.txt @@ -0,0 +1,9 @@ +#source_group(Base FILES main.c) +#source_group(Base\\Sub1 FILES sub1/foo.c) +#source_group(Base\\Sub1\\Sub2 FILES sub1/foobar.c) +#source_group("" FILES foo.c) +#source_group("\\" FILES bar.c) + + +add_executable(SourceGroups main.c bar.c foo.c sub1/foo.c sub1/foobar.c) + diff --git a/Tests/SourceGroups/bar.c b/Tests/SourceGroups/bar.c new file mode 100644 index 000000000..a2fcad5e9 --- /dev/null +++ b/Tests/SourceGroups/bar.c @@ -0,0 +1,4 @@ +int barbar(void) +{ + return 2; +} diff --git a/Tests/SourceGroups/foo.c b/Tests/SourceGroups/foo.c new file mode 100644 index 000000000..3bebc4d22 --- /dev/null +++ b/Tests/SourceGroups/foo.c @@ -0,0 +1,4 @@ +int bar(void) +{ + return 42; +} diff --git a/Tests/SourceGroups/main.c b/Tests/SourceGroups/main.c new file mode 100644 index 000000000..cd17e24c7 --- /dev/null +++ b/Tests/SourceGroups/main.c @@ -0,0 +1,12 @@ +#include + +extern int foo(void); +extern int bar(void); +extern int foobar(void); +extern int barbar(void); + +int main() +{ + printf("foo: %d bar: %d foobar: %d barbar: %d\n", foo(), bar(), foobar(), barbar()); + return 0; +} diff --git a/Tests/SourceGroups/sub1/foo.c b/Tests/SourceGroups/sub1/foo.c new file mode 100644 index 000000000..39912a748 --- /dev/null +++ b/Tests/SourceGroups/sub1/foo.c @@ -0,0 +1,4 @@ +int foo(void) +{ + return 17; +} diff --git a/Tests/SourceGroups/sub1/foobar.c b/Tests/SourceGroups/sub1/foobar.c new file mode 100644 index 000000000..32588b5e1 --- /dev/null +++ b/Tests/SourceGroups/sub1/foobar.c @@ -0,0 +1,4 @@ +int foobar(void) +{ + return 1477; +}