diff options
Diffstat (limited to 'Tests/CMakeCommands')
30 files changed, 130 insertions, 107 deletions
diff --git a/Tests/CMakeCommands/add_compile_options/main.cpp b/Tests/CMakeCommands/add_compile_options/main.cpp index 2bb20ac758..1d5702165c 100644 --- a/Tests/CMakeCommands/add_compile_options/main.cpp +++ b/Tests/CMakeCommands/add_compile_options/main.cpp @@ -1,8 +1,8 @@ #ifdef DO_GNU_TESTS -# ifndef TEST_OPTION -# error Expected TEST_OPTION -# endif +#ifndef TEST_OPTION +#error Expected TEST_OPTION +#endif #endif int main(void) diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.c b/Tests/CMakeCommands/target_compile_definitions/consumer.c index 5796d96524..7931a6f0e5 100644 --- a/Tests/CMakeCommands/target_compile_definitions/consumer.c +++ b/Tests/CMakeCommands/target_compile_definitions/consumer.c @@ -1,23 +1,22 @@ #ifdef TEST_LANG_DEFINES - #ifdef CONSUMER_LANG_CXX - #error Unexpected CONSUMER_LANG_CXX - #endif +#ifdef CONSUMER_LANG_CXX +#error Unexpected CONSUMER_LANG_CXX +#endif - #ifndef CONSUMER_LANG_C - #error Expected CONSUMER_LANG_C - #endif +#ifndef CONSUMER_LANG_C +#error Expected CONSUMER_LANG_C +#endif - #if !LANG_IS_C - #error Expected LANG_IS_C - #endif +#if !LANG_IS_C +#error Expected LANG_IS_C +#endif - #if LANG_IS_CXX - #error Unexpected LANG_IS_CXX - #endif +#if LANG_IS_CXX +#error Unexpected LANG_IS_CXX +#endif #endif void consumer_c() { - } diff --git a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp index 778f57e55e..0202c172e0 100644 --- a/Tests/CMakeCommands/target_compile_definitions/consumer.cpp +++ b/Tests/CMakeCommands/target_compile_definitions/consumer.cpp @@ -16,21 +16,24 @@ #endif #ifdef TEST_LANG_DEFINES - #ifndef CONSUMER_LANG_CXX - #error Expected CONSUMER_LANG_CXX - #endif +#ifndef CONSUMER_LANG_CXX +#error Expected CONSUMER_LANG_CXX +#endif - #ifdef CONSUMER_LANG_C - #error Unexpected CONSUMER_LANG_C - #endif +#ifdef CONSUMER_LANG_C +#error Unexpected CONSUMER_LANG_C +#endif - #if !LANG_IS_CXX - #error Expected LANG_IS_CXX - #endif +#if !LANG_IS_CXX +#error Expected LANG_IS_CXX +#endif - #if LANG_IS_C - #error Unexpected LANG_IS_C - #endif +#if LANG_IS_C +#error Unexpected LANG_IS_C +#endif #endif -int main() { return 0; } +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_compile_definitions/main.cpp b/Tests/CMakeCommands/target_compile_definitions/main.cpp index addb33cf91..bf08b45e36 100644 --- a/Tests/CMakeCommands/target_compile_definitions/main.cpp +++ b/Tests/CMakeCommands/target_compile_definitions/main.cpp @@ -11,4 +11,7 @@ #error Unexpected MY_INTERFACE_DEFINE #endif -int main() { return 0; } +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_compile_features/dummy.cpp b/Tests/CMakeCommands/target_compile_features/dummy.cpp index 341aaafa0a..e9ad2573b6 100644 --- a/Tests/CMakeCommands/target_compile_features/dummy.cpp +++ b/Tests/CMakeCommands/target_compile_features/dummy.cpp @@ -1,5 +1,5 @@ -int main(int, char **) +int main(int, char**) { return 0; } diff --git a/Tests/CMakeCommands/target_compile_features/lib_restrict.c b/Tests/CMakeCommands/target_compile_features/lib_restrict.c index 049c1b0084..2ceec971c5 100644 --- a/Tests/CMakeCommands/target_compile_features/lib_restrict.c +++ b/Tests/CMakeCommands/target_compile_features/lib_restrict.c @@ -1,7 +1,7 @@ #include "lib_restrict.h" -int foo(int * restrict a, int * restrict b) +int foo(int* restrict a, int* restrict b) { (void)a; (void)b; diff --git a/Tests/CMakeCommands/target_compile_features/lib_restrict.h b/Tests/CMakeCommands/target_compile_features/lib_restrict.h index eca22be10c..2e528b6d30 100644 --- a/Tests/CMakeCommands/target_compile_features/lib_restrict.h +++ b/Tests/CMakeCommands/target_compile_features/lib_restrict.h @@ -2,6 +2,6 @@ #ifndef LIB_RESTRICT_H #define LIB_RESTRICT_H -int foo(int * restrict a, int * restrict b); +int foo(int* restrict a, int* restrict b); #endif diff --git a/Tests/CMakeCommands/target_compile_features/lib_user.cpp b/Tests/CMakeCommands/target_compile_features/lib_user.cpp index 976068a0b7..541e528293 100644 --- a/Tests/CMakeCommands/target_compile_features/lib_user.cpp +++ b/Tests/CMakeCommands/target_compile_features/lib_user.cpp @@ -1,7 +1,7 @@ #include "lib_auto_type.h" -int main(int argc, char **argv) +int main(int argc, char** argv) { return getAutoType(); } diff --git a/Tests/CMakeCommands/target_compile_features/main.c b/Tests/CMakeCommands/target_compile_features/main.c index 831c5eb275..76e98c4a11 100644 --- a/Tests/CMakeCommands/target_compile_features/main.c +++ b/Tests/CMakeCommands/target_compile_features/main.c @@ -1,5 +1,5 @@ -int foo(int * restrict a, int * restrict b) +int foo(int* restrict a, int* restrict b) { (void)a; (void)b; diff --git a/Tests/CMakeCommands/target_compile_features/main.cpp b/Tests/CMakeCommands/target_compile_features/main.cpp index fe29b04adc..6f5daee0bb 100644 --- a/Tests/CMakeCommands/target_compile_features/main.cpp +++ b/Tests/CMakeCommands/target_compile_features/main.cpp @@ -1,5 +1,5 @@ -int main(int, char **) +int main(int, char**) { auto i = 0; return i; diff --git a/Tests/CMakeCommands/target_compile_features/restrict_user.c b/Tests/CMakeCommands/target_compile_features/restrict_user.c index d47b847b43..76c956fbb8 100644 --- a/Tests/CMakeCommands/target_compile_features/restrict_user.c +++ b/Tests/CMakeCommands/target_compile_features/restrict_user.c @@ -1,7 +1,7 @@ #include "lib_restrict.h" -int bar(int * restrict a, int * restrict b) +int bar(int* restrict a, int* restrict b) { (void)a; (void)b; diff --git a/Tests/CMakeCommands/target_compile_options/consumer.c b/Tests/CMakeCommands/target_compile_options/consumer.c index 5796d96524..7931a6f0e5 100644 --- a/Tests/CMakeCommands/target_compile_options/consumer.c +++ b/Tests/CMakeCommands/target_compile_options/consumer.c @@ -1,23 +1,22 @@ #ifdef TEST_LANG_DEFINES - #ifdef CONSUMER_LANG_CXX - #error Unexpected CONSUMER_LANG_CXX - #endif +#ifdef CONSUMER_LANG_CXX +#error Unexpected CONSUMER_LANG_CXX +#endif - #ifndef CONSUMER_LANG_C - #error Expected CONSUMER_LANG_C - #endif +#ifndef CONSUMER_LANG_C +#error Expected CONSUMER_LANG_C +#endif - #if !LANG_IS_C - #error Expected LANG_IS_C - #endif +#if !LANG_IS_C +#error Expected LANG_IS_C +#endif - #if LANG_IS_CXX - #error Unexpected LANG_IS_CXX - #endif +#if LANG_IS_CXX +#error Unexpected LANG_IS_CXX +#endif #endif void consumer_c() { - } diff --git a/Tests/CMakeCommands/target_compile_options/consumer.cpp b/Tests/CMakeCommands/target_compile_options/consumer.cpp index c5882a54b7..71a60986ae 100644 --- a/Tests/CMakeCommands/target_compile_options/consumer.cpp +++ b/Tests/CMakeCommands/target_compile_options/consumer.cpp @@ -1,36 +1,39 @@ #ifdef DO_GNU_TESTS -# ifdef MY_PRIVATE_DEFINE -# error Unexpected MY_PRIVATE_DEFINE -# endif +#ifdef MY_PRIVATE_DEFINE +#error Unexpected MY_PRIVATE_DEFINE +#endif -# ifndef MY_PUBLIC_DEFINE -# error Expected MY_PUBLIC_DEFINE -# endif +#ifndef MY_PUBLIC_DEFINE +#error Expected MY_PUBLIC_DEFINE +#endif -# ifndef MY_INTERFACE_DEFINE -# error Expected MY_INTERFACE_DEFINE -# endif +#ifndef MY_INTERFACE_DEFINE +#error Expected MY_INTERFACE_DEFINE +#endif #endif #ifdef TEST_LANG_DEFINES - #ifndef CONSUMER_LANG_CXX - #error Expected CONSUMER_LANG_CXX - #endif +#ifndef CONSUMER_LANG_CXX +#error Expected CONSUMER_LANG_CXX +#endif - #ifdef CONSUMER_LANG_C - #error Unexpected CONSUMER_LANG_C - #endif +#ifdef CONSUMER_LANG_C +#error Unexpected CONSUMER_LANG_C +#endif - #if !LANG_IS_CXX - #error Expected LANG_IS_CXX - #endif +#if !LANG_IS_CXX +#error Expected LANG_IS_CXX +#endif - #if LANG_IS_C - #error Unexpected LANG_IS_C - #endif +#if LANG_IS_C +#error Unexpected LANG_IS_C +#endif #endif -int main() { return 0; } +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_compile_options/main.cpp b/Tests/CMakeCommands/target_compile_options/main.cpp index 961c06dd70..ac472aedad 100644 --- a/Tests/CMakeCommands/target_compile_options/main.cpp +++ b/Tests/CMakeCommands/target_compile_options/main.cpp @@ -1,18 +1,21 @@ #ifdef DO_GNU_TESTS -# ifndef MY_PRIVATE_DEFINE -# error Expected MY_PRIVATE_DEFINE -# endif +#ifndef MY_PRIVATE_DEFINE +#error Expected MY_PRIVATE_DEFINE +#endif -# ifndef MY_PUBLIC_DEFINE -# error Expected MY_PUBLIC_DEFINE -# endif +#ifndef MY_PUBLIC_DEFINE +#error Expected MY_PUBLIC_DEFINE +#endif -# ifdef MY_INTERFACE_DEFINE -# error Unexpected MY_INTERFACE_DEFINE -# endif +#ifdef MY_INTERFACE_DEFINE +#error Unexpected MY_INTERFACE_DEFINE +#endif #endif -int main() { return 0; } +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_include_directories/consumer.c b/Tests/CMakeCommands/target_include_directories/consumer.c index 8821f5bc79..ae88f9248d 100644 --- a/Tests/CMakeCommands/target_include_directories/consumer.c +++ b/Tests/CMakeCommands/target_include_directories/consumer.c @@ -1,10 +1,13 @@ #ifdef TEST_LANG_DEFINES - #include "c_only.h" +#include "c_only.h" - #ifndef C_ONLY_DEFINE - #error Expected C_ONLY_DEFINE - #endif +#ifndef C_ONLY_DEFINE +#error Expected C_ONLY_DEFINE +#endif #endif -int consumer_c() { return 0; } +int consumer_c() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_include_directories/consumer.cpp b/Tests/CMakeCommands/target_include_directories/consumer.cpp index 9e1656a977..0f8153b83d 100644 --- a/Tests/CMakeCommands/target_include_directories/consumer.cpp +++ b/Tests/CMakeCommands/target_include_directories/consumer.cpp @@ -5,7 +5,7 @@ #include "publicinclude.h" #include "relative_dir.h" #ifdef TEST_LANG_DEFINES - #include "cxx_only.h" +#include "cxx_only.h" #endif #ifdef PRIVATEINCLUDE_DEFINE @@ -33,9 +33,12 @@ #endif #ifdef TEST_LANG_DEFINES - #ifndef CXX_ONLY_DEFINE - #error Expected CXX_ONLY_DEFINE - #endif +#ifndef CXX_ONLY_DEFINE +#error Expected CXX_ONLY_DEFINE +#endif #endif -int main() { return 0; } +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_include_directories/main.cpp b/Tests/CMakeCommands/target_include_directories/main.cpp index 8434b97d8e..71298ceacd 100644 --- a/Tests/CMakeCommands/target_include_directories/main.cpp +++ b/Tests/CMakeCommands/target_include_directories/main.cpp @@ -19,4 +19,7 @@ #error Expected CURE_DEFINE #endif -int main() { return 0; } +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp index 41dc3ce18d..80b3c0800b 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.cpp @@ -4,7 +4,6 @@ OnlyPlainLib1::OnlyPlainLib1() : result(0) { - } int OnlyPlainLib1::GetResult() diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h index c0373ceb3b..2bc04eebed 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib1.h @@ -1,9 +1,9 @@ struct #ifdef _WIN32 -__declspec(dllexport) + __declspec(dllexport) #endif -OnlyPlainLib1 + OnlyPlainLib1 { OnlyPlainLib1(); diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h index 74b18a00ef..6f18d20d35 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib2.h @@ -4,4 +4,4 @@ #ifdef _WIN32 __declspec(dllexport) #endif -OnlyPlainLib1 onlyPlainLib2(); + OnlyPlainLib1 onlyPlainLib2(); diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp index 0fb7b0a67b..02e94153eb 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/onlyplainlib_user.cpp @@ -1,7 +1,7 @@ #include "onlyplainlib2.h" -int main(int argc, char **argv) +int main(int argc, char** argv) { return onlyPlainLib2().GetResult(); } diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp index a253c46f61..d6b3986c77 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.cpp @@ -1,2 +1,5 @@ -int staticlib1() { return 0; } +int staticlib1() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h index 4bbf23ffdf..7d58b108cc 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib1.h @@ -1,4 +1,4 @@ #ifdef _WIN32 __declspec(dllexport) #endif -int staticlib1(); + int staticlib1(); diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp index 4e38063b51..bd1a9011ee 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.cpp @@ -1,2 +1,5 @@ -int staticlib2() { return 0; } +int staticlib2() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h index a4e07b6c13..bbfdaa3bfa 100644 --- a/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h +++ b/Tests/CMakeCommands/target_link_libraries/cmp0022/staticlib2.h @@ -1,4 +1,4 @@ #ifdef _WIN32 __declspec(dllexport) #endif -int staticlib2(); + int staticlib2(); diff --git a/Tests/CMakeCommands/target_link_libraries/depC.h b/Tests/CMakeCommands/target_link_libraries/depC.h index 4d65c9eb35..01c9e06bb1 100644 --- a/Tests/CMakeCommands/target_link_libraries/depC.h +++ b/Tests/CMakeCommands/target_link_libraries/depC.h @@ -8,5 +8,4 @@ struct DEPC_EXPORT DepC int foo(); DepA getA(); - }; diff --git a/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp b/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp index d1321a15fe..1caa516ad4 100644 --- a/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp +++ b/Tests/CMakeCommands/target_link_libraries/newsignature1.cpp @@ -5,7 +5,7 @@ #include "subdirlib.h" -int main(int, char **) +int main(int, char**) { DepA a; DepB b; diff --git a/Tests/CMakeCommands/target_link_libraries/targetA.cpp b/Tests/CMakeCommands/target_link_libraries/targetA.cpp index d1321a15fe..1caa516ad4 100644 --- a/Tests/CMakeCommands/target_link_libraries/targetA.cpp +++ b/Tests/CMakeCommands/target_link_libraries/targetA.cpp @@ -5,7 +5,7 @@ #include "subdirlib.h" -int main(int, char **) +int main(int, char**) { DepA a; DepB b; diff --git a/Tests/CMakeCommands/target_link_libraries/targetB.cpp b/Tests/CMakeCommands/target_link_libraries/targetB.cpp index 0913a57b06..a08c79a7e2 100644 --- a/Tests/CMakeCommands/target_link_libraries/targetB.cpp +++ b/Tests/CMakeCommands/target_link_libraries/targetB.cpp @@ -1,7 +1,7 @@ #include "depD.h" -int main(int, char **) +int main(int, char**) { DepD d; DepA a = d.getA(); diff --git a/Tests/CMakeCommands/target_link_libraries/targetC.cpp b/Tests/CMakeCommands/target_link_libraries/targetC.cpp index 35426605df..7c5c9e4268 100644 --- a/Tests/CMakeCommands/target_link_libraries/targetC.cpp +++ b/Tests/CMakeCommands/target_link_libraries/targetC.cpp @@ -8,7 +8,7 @@ #error Expected TEST_DEF definition #endif -int main(int, char **) +int main(int, char**) { DepG g; |