summaryrefslogtreecommitdiffstats
path: root/Tests/Module
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Tests/Module
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Tests/Module')
-rw-r--r--Tests/Module/CheckTypeSize/CheckTypeSize.c81
-rw-r--r--Tests/Module/CheckTypeSize/CheckTypeSize.cxx87
-rw-r--r--Tests/Module/CheckTypeSize/someclass.hxx11
-rw-r--r--Tests/Module/CheckTypeSize/somestruct.h9
-rw-r--r--Tests/Module/GenerateExportHeader/c_identifier/main.cpp2
-rw-r--r--Tests/Module/GenerateExportHeader/exportheader_test.cpp42
-rw-r--r--Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp33
-rw-r--r--Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h36
-rw-r--r--Tests/Module/GenerateExportHeader/libshared/libshared.cpp33
-rw-r--r--Tests/Module/GenerateExportHeader/libshared/libshared.h9
-rw-r--r--Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp30
-rw-r--r--Tests/Module/GenerateExportHeader/libstatic/libstatic.h9
-rw-r--r--Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp1
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/compile_tests.h6
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main.c19
-rw-r--r--Tests/Module/WriteCompilerDetectionHeader/main_multi.c19
16 files changed, 238 insertions, 189 deletions
diff --git a/Tests/Module/CheckTypeSize/CheckTypeSize.c b/Tests/Module/CheckTypeSize/CheckTypeSize.c
index 32e395c..05c798b 100644
--- a/Tests/Module/CheckTypeSize/CheckTypeSize.c
+++ b/Tests/Module/CheckTypeSize/CheckTypeSize.c
@@ -2,37 +2,38 @@
#include "somestruct.h"
#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
+#include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
-# include <stdint.h>
+#include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
-# include <stddef.h>
+#include <stddef.h>
#endif
#include <stdio.h>
-#define CHECK(t,m) do { \
- if(sizeof(t) != m) \
- { \
- printf(#m ": expected %d, got %d (line %d)\n", \
- (int)sizeof(t), (int)m, __LINE__); \
- result = 1; \
- } \
- } while(0)
-
-#define NODEF(m) do { \
- printf(#m": not defined (line %d)\n", __LINE__); \
- result = 1; \
- } while(0)
+#define CHECK(t, m) \
+ do { \
+ if (sizeof(t) != m) { \
+ printf(#m ": expected %d, got %d (line %d)\n", (int)sizeof(t), (int)m, \
+ __LINE__); \
+ result = 1; \
+ } \
+ } while (0)
+
+#define NODEF(m) \
+ do { \
+ printf(#m ": not defined (line %d)\n", __LINE__); \
+ result = 1; \
+ } while (0)
int main()
{
int result = 0;
struct somestruct x;
- /* void* */
+/* void* */
#if !defined(HAVE_SIZEOF_DATA_PTR)
NODEF(HAVE_SIZEOF_DATA_PTR);
#endif
@@ -42,7 +43,7 @@ int main()
NODEF(SIZEOF_DATA_PTR);
#endif
- /* char */
+/* char */
#if !defined(HAVE_SIZEOF_CHAR)
NODEF(HAVE_SIZEOF_CHAR);
#endif
@@ -52,7 +53,7 @@ int main()
NODEF(SIZEOF_CHAR);
#endif
- /* short */
+/* short */
#if !defined(HAVE_SIZEOF_SHORT)
NODEF(HAVE_SIZEOF_SHORT);
#endif
@@ -62,7 +63,7 @@ int main()
NODEF(SIZEOF_SHORT);
#endif
- /* int */
+/* int */
#if !defined(HAVE_SIZEOF_INT)
NODEF(HAVE_SIZEOF_INT);
#endif
@@ -72,7 +73,7 @@ int main()
NODEF(SIZEOF_INT);
#endif
- /* long */
+/* long */
#if !defined(HAVE_SIZEOF_LONG)
NODEF(HAVE_SIZEOF_LONG);
#endif
@@ -82,25 +83,25 @@ int main()
NODEF(SIZEOF_LONG);
#endif
- /* long long */
+/* long long */
#if defined(SIZEOF_LONG_LONG)
CHECK(long long, SIZEOF_LONG_LONG);
-# if !defined(HAVE_SIZEOF_LONG_LONG)
+#if !defined(HAVE_SIZEOF_LONG_LONG)
NODEF(HAVE_SIZEOF_LONG_LONG);
-# endif
+#endif
#endif
- /* __int64 */
+/* __int64 */
#if defined(SIZEOF___INT64)
CHECK(__int64, SIZEOF___INT64);
-# if !defined(HAVE_SIZEOF___INT64)
+#if !defined(HAVE_SIZEOF___INT64)
NODEF(HAVE_SIZEOF___INT64);
-# endif
+#endif
#elif defined(HAVE_SIZEOF___INT64)
NODEF(SIZEOF___INT64);
#endif
- /* size_t */
+/* size_t */
#if !defined(HAVE_SIZEOF_SIZE_T)
NODEF(HAVE_SIZEOF_SIZE_T);
#endif
@@ -110,45 +111,45 @@ int main()
NODEF(SIZEOF_SIZE_T);
#endif
- /* ssize_t */
+/* ssize_t */
#if defined(SIZEOF_SSIZE_T)
CHECK(ssize_t, SIZEOF_SSIZE_T);
-# if !defined(HAVE_SIZEOF_SSIZE_T)
+#if !defined(HAVE_SIZEOF_SSIZE_T)
NODEF(HAVE_SIZEOF_SSIZE_T);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_SSIZE_T)
NODEF(SIZEOF_SSIZE_T);
#endif
- /* struct somestruct::someint */
+/* struct somestruct::someint */
#if defined(SIZEOF_STRUCTMEMBER_INT)
CHECK(x.someint, SIZEOF_STRUCTMEMBER_INT);
CHECK(x.someint, SIZEOF_INT);
-# if !defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
+#if !defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(SIZEOF_STRUCTMEMBER_INT);
#endif
- /* struct somestruct::someptr */
+/* struct somestruct::someptr */
#if defined(SIZEOF_STRUCTMEMBER_PTR)
CHECK(x.someptr, SIZEOF_STRUCTMEMBER_PTR);
CHECK(x.someptr, SIZEOF_DATA_PTR);
-# if !defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
+#if !defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_PTR);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_PTR)
NODEF(SIZEOF_STRUCTMEMBER_PTR);
#endif
- /* struct somestruct::someint */
+/* struct somestruct::someint */
#if defined(SIZEOF_STRUCTMEMBER_CHAR)
CHECK(x.somechar, SIZEOF_STRUCTMEMBER_CHAR);
CHECK(x.somechar, SIZEOF_CHAR);
-# if !defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
+#if !defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_CHAR);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_CHAR)
NODEF(SIZEOF_STRUCTMEMBER_CHAR);
#endif
diff --git a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
index b5692cd..2ae84a3 100644
--- a/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
+++ b/Tests/Module/CheckTypeSize/CheckTypeSize.cxx
@@ -3,37 +3,38 @@
#include "someclass.hxx"
#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
+#include <sys/types.h>
#endif
#ifdef HAVE_STDINT_H
-# include <stdint.h>
+#include <stdint.h>
#endif
#ifdef HAVE_STDDEF_H
-# include <stddef.h>
+#include <stddef.h>
#endif
#include <stdio.h>
-#define CHECK(t,m) do { \
- if(sizeof(t) != m) \
- { \
- printf(#m ": expected %d, got %d (line %d)\n", \
- (int)sizeof(t), (int)m, __LINE__); \
- result = 1; \
- } \
- } while(0)
-
-#define NODEF(m) do { \
- printf(#m": not defined (line %d)\n", __LINE__); \
- result = 1; \
- } while(0)
+#define CHECK(t, m) \
+ do { \
+ if (sizeof(t) != m) { \
+ printf(#m ": expected %d, got %d (line %d)\n", (int)sizeof(t), (int)m, \
+ __LINE__); \
+ result = 1; \
+ } \
+ } while (0)
+
+#define NODEF(m) \
+ do { \
+ printf(#m ": not defined (line %d)\n", __LINE__); \
+ result = 1; \
+ } while (0)
int main()
{
int result = 0;
ns::someclass y;
- /* void* */
+/* void* */
#if !defined(HAVE_SIZEOF_DATA_PTR)
NODEF(HAVE_SIZEOF_DATA_PTR);
#endif
@@ -43,7 +44,7 @@ int main()
NODEF(SIZEOF_DATA_PTR);
#endif
- /* char */
+/* char */
#if !defined(HAVE_SIZEOF_CHAR)
NODEF(HAVE_SIZEOF_CHAR);
#endif
@@ -53,7 +54,7 @@ int main()
NODEF(SIZEOF_CHAR);
#endif
- /* short */
+/* short */
#if !defined(HAVE_SIZEOF_SHORT)
NODEF(HAVE_SIZEOF_SHORT);
#endif
@@ -63,7 +64,7 @@ int main()
NODEF(SIZEOF_SHORT);
#endif
- /* int */
+/* int */
#if !defined(HAVE_SIZEOF_INT)
NODEF(HAVE_SIZEOF_INT);
#endif
@@ -73,7 +74,7 @@ int main()
NODEF(SIZEOF_INT);
#endif
- /* long */
+/* long */
#if !defined(HAVE_SIZEOF_LONG)
NODEF(HAVE_SIZEOF_LONG);
#endif
@@ -83,25 +84,25 @@ int main()
NODEF(SIZEOF_LONG);
#endif
- /* long long */
+/* long long */
#if defined(SIZEOF_LONG_LONG)
CHECK(long long, SIZEOF_LONG_LONG);
-# if !defined(HAVE_SIZEOF_LONG_LONG)
+#if !defined(HAVE_SIZEOF_LONG_LONG)
NODEF(HAVE_SIZEOF_LONG_LONG);
-# endif
+#endif
#endif
- /* __int64 */
+/* __int64 */
#if defined(SIZEOF___INT64)
CHECK(__int64, SIZEOF___INT64);
-# if !defined(HAVE_SIZEOF___INT64)
+#if !defined(HAVE_SIZEOF___INT64)
NODEF(HAVE_SIZEOF___INT64);
-# endif
+#endif
#elif defined(HAVE_SIZEOF___INT64)
NODEF(SIZEOF___INT64);
#endif
- /* size_t */
+/* size_t */
#if !defined(HAVE_SIZEOF_SIZE_T)
NODEF(HAVE_SIZEOF_SIZE_T);
#endif
@@ -111,56 +112,56 @@ int main()
NODEF(SIZEOF_SIZE_T);
#endif
- /* ssize_t */
+/* ssize_t */
#if defined(SIZEOF_SSIZE_T)
CHECK(ssize_t, SIZEOF_SSIZE_T);
-# if !defined(HAVE_SIZEOF_SSIZE_T)
+#if !defined(HAVE_SIZEOF_SSIZE_T)
NODEF(HAVE_SIZEOF_SSIZE_T);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_SSIZE_T)
NODEF(SIZEOF_SSIZE_T);
#endif
- /* ns::someclass::someint */
+/* ns::someclass::someint */
#if defined(SIZEOF_NS_CLASSMEMBER_INT)
CHECK(y.someint, SIZEOF_NS_CLASSMEMBER_INT);
CHECK(y.someint, SIZEOF_INT);
-# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
+#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_INT)
NODEF(HAVE_SIZEOF_STRUCTMEMBER_INT);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_STRUCTMEMBER_INT)
NODEF(SIZEOF_STRUCTMEMBER_INT);
#endif
- /* ns::someclass::someptr */
+/* ns::someclass::someptr */
#if defined(SIZEOF_NS_CLASSMEMBER_PTR)
CHECK(y.someptr, SIZEOF_NS_CLASSMEMBER_PTR);
CHECK(y.someptr, SIZEOF_DATA_PTR);
-# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
+#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_PTR);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_PTR)
NODEF(SIZEOF_NS_CLASSMEMBER_PTR);
#endif
- /* ns::someclass::somechar */
+/* ns::someclass::somechar */
#if defined(SIZEOF_NS_CLASSMEMBER_CHAR)
CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_CHAR);
CHECK(y.somechar, SIZEOF_CHAR);
-# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
+#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_CHAR)
NODEF(SIZEOF_NS_CLASSMEMBER_CHAR);
#endif
- /* ns::someclass::somebool */
+/* ns::someclass::somebool */
#if defined(SIZEOF_NS_CLASSMEMBER_BOOL)
CHECK(y.somechar, SIZEOF_NS_CLASSMEMBER_BOOL);
CHECK(y.somechar, SIZEOF_BOOL);
-# if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
+#if !defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
NODEF(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL);
-# endif
+#endif
#elif defined(HAVE_SIZEOF_NS_CLASSMEMBER_BOOL)
NODEF(SIZEOF_NS_CLASSMEMBER_BOOL);
#endif
diff --git a/Tests/Module/CheckTypeSize/someclass.hxx b/Tests/Module/CheckTypeSize/someclass.hxx
index 76c07ec..60d90db 100644
--- a/Tests/Module/CheckTypeSize/someclass.hxx
+++ b/Tests/Module/CheckTypeSize/someclass.hxx
@@ -2,12 +2,13 @@
#define _CMAKE_SOMECLASS_HXX
namespace ns {
-class someclass {
+class someclass
+{
public:
- int someint;
- void *someptr;
- char somechar;
- bool somebool;
+ int someint;
+ void* someptr;
+ char somechar;
+ bool somebool;
};
}
diff --git a/Tests/Module/CheckTypeSize/somestruct.h b/Tests/Module/CheckTypeSize/somestruct.h
index e08efc4..ffff34f 100644
--- a/Tests/Module/CheckTypeSize/somestruct.h
+++ b/Tests/Module/CheckTypeSize/somestruct.h
@@ -1,10 +1,11 @@
#ifndef _CMAKE_SOMESTRUCT_H
#define _CMAKE_SOMESTRUCT_H
-struct somestruct {
- int someint;
- void *someptr;
- char somechar;
+struct somestruct
+{
+ int someint;
+ void* someptr;
+ char somechar;
};
#endif
diff --git a/Tests/Module/GenerateExportHeader/c_identifier/main.cpp b/Tests/Module/GenerateExportHeader/c_identifier/main.cpp
index 68beebb..891bc42 100644
--- a/Tests/Module/GenerateExportHeader/c_identifier/main.cpp
+++ b/Tests/Module/GenerateExportHeader/c_identifier/main.cpp
@@ -1,7 +1,7 @@
#include "c_identifier_class.h"
-int main(int argc, char **argv)
+int main(int argc, char** argv)
{
CIdentifierClass cic;
return cic.someMethod();
diff --git a/Tests/Module/GenerateExportHeader/exportheader_test.cpp b/Tests/Module/GenerateExportHeader/exportheader_test.cpp
index 7802c43..26bea7e 100644
--- a/Tests/Module/GenerateExportHeader/exportheader_test.cpp
+++ b/Tests/Module/GenerateExportHeader/exportheader_test.cpp
@@ -20,21 +20,18 @@ void compare(const char* refName, const char* testName)
{
std::ifstream ref;
ref.open(refName);
- if (!ref.is_open())
- {
+ if (!ref.is_open()) {
std::cout << "Could not open \"" << refName << "\"." << std::endl;
exit(1);
- }
+ }
std::ifstream test;
test.open(testName);
- if (!test.is_open())
- {
+ if (!test.is_open()) {
std::cout << "Could not open \"" << testName << "\"." << std::endl;
exit(1);
- }
+ }
- while (!ref.eof() && !test.eof())
- {
+ while (!ref.eof() && !test.eof()) {
std::string refLine;
std::string testLine;
std::getline(ref, refLine);
@@ -42,31 +39,26 @@ void compare(const char* refName, const char* testName)
// Some very old Borland runtimes (C++ Builder 5 WITHOUT Update 1) add a
// trailing null to the string that we need to strip before testing for a
// trailing space.
- if (refLine.size() && refLine[refLine.size()-1] == 0)
- {
+ if (refLine.size() && refLine[refLine.size() - 1] == 0) {
refLine = refLine.substr(0, refLine.size() - 1);
- }
- if (testLine.size() && testLine[testLine.size()-1] == 0)
- {
+ }
+ if (testLine.size() && testLine[testLine.size() - 1] == 0) {
testLine = testLine.substr(0, testLine.size() - 1);
- }
+ }
// The reference files never have trailing spaces:
- if (testLine.size() && testLine[testLine.size()-1] == ' ')
- {
+ if (testLine.size() && testLine[testLine.size() - 1] == ' ') {
testLine = testLine.substr(0, testLine.size() - 1);
- }
- if (refLine != testLine)
- {
- std::cout << "Ref and test are not the same:\n Ref: \""
- << refLine << "\"\n Test: \"" << testLine << "\"\n";
+ }
+ if (refLine != testLine) {
+ std::cout << "Ref and test are not the same:\n Ref: \"" << refLine
+ << "\"\n Test: \"" << testLine << "\"\n";
exit(1);
- }
}
- if (!ref.eof() || !test.eof())
- {
+ }
+ if (!ref.eof() || !test.eof()) {
std::cout << "Ref and test have differing numbers of lines.";
exit(1);
- }
+ }
}
int main()
diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp b/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
index 1e07273..2764905 100644
--- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
+++ b/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.cpp
@@ -16,11 +16,13 @@ int LibsharedAndStatic::libshared_and_static_deprecated() const
return 0;
}
-int LibsharedAndStatic::libshared_and_static_not_exported() const {
+int LibsharedAndStatic::libshared_and_static_not_exported() const
+{
return 0;
}
-int LibsharedAndStatic::libshared_and_static_excluded() const {
+int LibsharedAndStatic::libshared_and_static_excluded() const
+{
return 0;
}
@@ -39,11 +41,13 @@ int LibsharedAndStaticNotExported::libshared_and_static_deprecated() const
return 0;
}
-int LibsharedAndStaticNotExported::libshared_and_static_not_exported() const {
+int LibsharedAndStaticNotExported::libshared_and_static_not_exported() const
+{
return 0;
}
-int LibsharedAndStaticNotExported::libshared_and_static_excluded() const {
+int LibsharedAndStaticNotExported::libshared_and_static_excluded() const
+{
return 0;
}
@@ -62,30 +66,37 @@ int LibsharedAndStaticExcluded::libshared_and_static_deprecated() const
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static_not_exported() const {
+int LibsharedAndStaticExcluded::libshared_and_static_not_exported() const
+{
return 0;
}
-int LibsharedAndStaticExcluded::libshared_and_static_excluded() const {
+int LibsharedAndStaticExcluded::libshared_and_static_excluded() const
+{
return 0;
}
-int libshared_and_static() {
+int libshared_and_static()
+{
return 0;
}
-int libshared_and_static_exported() {
+int libshared_and_static_exported()
+{
return 0;
}
-int libshared_and_static_deprecated() {
+int libshared_and_static_deprecated()
+{
return 0;
}
-int libshared_and_static_not_exported() {
+int libshared_and_static_not_exported()
+{
return 0;
}
-int libshared_and_static_excluded() {
+int libshared_and_static_excluded()
+{
return 0;
}
diff --git a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h b/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h
index 5ad77f4..ea672fe 100644
--- a/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h
+++ b/Tests/Module/GenerateExportHeader/lib_shared_and_static/libshared_and_static.h
@@ -4,48 +4,60 @@
#include "libshared_and_static_export.h"
-class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT LibsharedAndStatic {
+class MYPREFIX_LIBSHARED_AND_STATIC_EXPORT LibsharedAndStatic
+{
public:
int libshared_and_static() const;
int libshared_and_static_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED libshared_and_static_deprecated() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
+ libshared_and_static_deprecated() const;
int libshared_and_static_not_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
+ libshared_and_static_excluded() const;
};
-class LibsharedAndStaticNotExported {
+class LibsharedAndStaticNotExported
+{
public:
int libshared_and_static() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT libshared_and_static_exported() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT
+ libshared_and_static_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED libshared_and_static_deprecated() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
+ libshared_and_static_deprecated() const;
int libshared_and_static_not_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
+ libshared_and_static_excluded() const;
};
-class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT LibsharedAndStaticExcluded {
+class MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT LibsharedAndStaticExcluded
+{
public:
int libshared_and_static() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT libshared_and_static_exported() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_EXPORT
+ libshared_and_static_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED libshared_and_static_deprecated() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED
+ libshared_and_static_deprecated() const;
int libshared_and_static_not_exported() const;
- int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT libshared_and_static_excluded() const;
+ int MYPREFIX_LIBSHARED_AND_STATIC_NO_EXPORT
+ libshared_and_static_excluded() const;
};
MYPREFIX_LIBSHARED_AND_STATIC_EXPORT int libshared_and_static_exported();
-MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT int libshared_and_static_deprecated();
+MYPREFIX_LIBSHARED_AND_STATIC_DEPRECATED_EXPORT int
+libshared_and_static_deprecated();
int libshared_and_static_not_exported();
diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.cpp b/Tests/Module/GenerateExportHeader/libshared/libshared.cpp
index d4041b3..ad6d356 100644
--- a/Tests/Module/GenerateExportHeader/libshared/libshared.cpp
+++ b/Tests/Module/GenerateExportHeader/libshared/libshared.cpp
@@ -16,11 +16,13 @@ int Libshared::libshared_deprecated() const
return 0;
}
-int Libshared::libshared_not_exported() const {
+int Libshared::libshared_not_exported() const
+{
return 0;
}
-int Libshared::libshared_excluded() const {
+int Libshared::libshared_excluded() const
+{
return 0;
}
@@ -39,11 +41,13 @@ int LibsharedNotExported::libshared_deprecated() const
return 0;
}
-int LibsharedNotExported::libshared_not_exported() const {
+int LibsharedNotExported::libshared_not_exported() const
+{
return 0;
}
-int LibsharedNotExported::libshared_excluded() const {
+int LibsharedNotExported::libshared_excluded() const
+{
return 0;
}
@@ -62,30 +66,37 @@ int LibsharedExcluded::libshared_deprecated() const
return 0;
}
-int LibsharedExcluded::libshared_not_exported() const {
+int LibsharedExcluded::libshared_not_exported() const
+{
return 0;
}
-int LibsharedExcluded::libshared_excluded() const {
+int LibsharedExcluded::libshared_excluded() const
+{
return 0;
}
-int libshared() {
+int libshared()
+{
return 0;
}
-int libshared_exported() {
+int libshared_exported()
+{
return 0;
}
-int libshared_deprecated() {
+int libshared_deprecated()
+{
return 0;
}
-int libshared_not_exported() {
+int libshared_not_exported()
+{
return 0;
}
-int libshared_excluded() {
+int libshared_excluded()
+{
return 0;
}
diff --git a/Tests/Module/GenerateExportHeader/libshared/libshared.h b/Tests/Module/GenerateExportHeader/libshared/libshared.h
index 3d9bbff..bd9f2e3 100644
--- a/Tests/Module/GenerateExportHeader/libshared/libshared.h
+++ b/Tests/Module/GenerateExportHeader/libshared/libshared.h
@@ -4,7 +4,8 @@
#include "libshared_export.h"
-class LIBSHARED_EXPORT Libshared {
+class LIBSHARED_EXPORT Libshared
+{
public:
int libshared() const;
@@ -17,7 +18,8 @@ public:
int LIBSHARED_NO_EXPORT libshared_excluded() const;
};
-class LibsharedNotExported {
+class LibsharedNotExported
+{
public:
int libshared() const;
@@ -30,7 +32,8 @@ public:
int LIBSHARED_NO_EXPORT libshared_excluded() const;
};
-class LIBSHARED_NO_EXPORT LibsharedExcluded {
+class LIBSHARED_NO_EXPORT LibsharedExcluded
+{
public:
int libshared() const;
diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp b/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp
index 0710c3e..89381af 100644
--- a/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp
+++ b/Tests/Module/GenerateExportHeader/libstatic/libstatic.cpp
@@ -16,11 +16,13 @@ int Libstatic::libstatic_deprecated() const
return 0;
}
-int Libstatic::libstatic_not_exported() const {
+int Libstatic::libstatic_not_exported() const
+{
return 0;
}
-int Libstatic::libstatic_excluded() const {
+int Libstatic::libstatic_excluded() const
+{
return 0;
}
@@ -39,11 +41,13 @@ int LibstaticNotExported::libstatic_deprecated() const
return 0;
}
-int LibstaticNotExported::libstatic_not_exported() const {
+int LibstaticNotExported::libstatic_not_exported() const
+{
return 0;
}
-int LibstaticNotExported::libstatic_excluded() const {
+int LibstaticNotExported::libstatic_excluded() const
+{
return 0;
}
@@ -62,26 +66,32 @@ int LibstaticExcluded::libstatic_deprecated() const
return 0;
}
-int LibstaticExcluded::libstatic_not_exported() const {
+int LibstaticExcluded::libstatic_not_exported() const
+{
return 0;
}
-int LibstaticExcluded::libstatic_excluded() const {
+int LibstaticExcluded::libstatic_excluded() const
+{
return 0;
}
-int libstatic_exported() {
+int libstatic_exported()
+{
return 0;
}
-int libstatic_deprecated() {
+int libstatic_deprecated()
+{
return 0;
}
-int libstatic_not_exported() {
+int libstatic_not_exported()
+{
return 0;
}
-int libstatic_excluded() {
+int libstatic_excluded()
+{
return 0;
}
diff --git a/Tests/Module/GenerateExportHeader/libstatic/libstatic.h b/Tests/Module/GenerateExportHeader/libstatic/libstatic.h
index cc7a35b..6072d9b 100644
--- a/Tests/Module/GenerateExportHeader/libstatic/libstatic.h
+++ b/Tests/Module/GenerateExportHeader/libstatic/libstatic.h
@@ -4,7 +4,8 @@
#include "libstatic_export.h"
-class LIBSTATIC_EXPORT Libstatic {
+class LIBSTATIC_EXPORT Libstatic
+{
public:
int libstatic() const;
@@ -17,7 +18,8 @@ public:
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
};
-class LibstaticNotExported {
+class LibstaticNotExported
+{
public:
int libstatic() const;
@@ -30,7 +32,8 @@ public:
int LIBSTATIC_NO_EXPORT libstatic_excluded() const;
};
-class LIBSTATIC_NO_EXPORT LibstaticExcluded {
+class LIBSTATIC_NO_EXPORT LibstaticExcluded
+{
public:
int libstatic() const;
diff --git a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp b/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp
index a3f4111..81dce62 100644
--- a/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp
+++ b/Tests/Module/GenerateExportHeader/nodeprecated/src/someclass.cpp
@@ -4,6 +4,5 @@
#ifndef NODEPRECATEDLIB_NO_DEPRECATED
void SomeClass::someMethod() const
{
-
}
#endif
diff --git a/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h b/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h
index 8b547d8..d3c2a2d 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h
+++ b/Tests/Module/WriteCompilerDetectionHeader/compile_tests.h
@@ -1,8 +1,10 @@
-#define JOIN_IMPL(A, B) A ## B
+#define JOIN_IMPL(A, B) A##B
#define JOIN(A, B) JOIN_IMPL(A, B)
-#define CHECK(FEATURE) (JOIN(PREFIX, JOIN(_COMPILER_, FEATURE)) == JOIN(EXPECTED_COMPILER_, FEATURE))
+#define CHECK(FEATURE) \
+ (JOIN(PREFIX, JOIN(_COMPILER_, FEATURE)) == \
+ JOIN(EXPECTED_COMPILER_, FEATURE))
#if !CHECK(CXX_DELEGATING_CONSTRUCTORS)
#error cxx_delegating_constructors expected availability did not match.
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.c b/Tests/Module/WriteCompilerDetectionHeader/main.c
index 9023b0f..ee6abdb 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main.c
+++ b/Tests/Module/WriteCompilerDetectionHeader/main.c
@@ -1,22 +1,23 @@
#include "test_compiler_detection.h"
-#if !defined(TEST_COMPILER_C_FUNCTION_PROTOTYPES) || !TEST_COMPILER_C_FUNCTION_PROTOTYPES
-# error Expected TEST_COMPILER_C_FUNCTION_PROTOTYPES
+#if !defined(TEST_COMPILER_C_FUNCTION_PROTOTYPES) || \
+ !TEST_COMPILER_C_FUNCTION_PROTOTYPES
+#error Expected TEST_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
-# error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
+#error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !defined(TEST_COMPILER_C_RESTRICT) || !TEST_COMPILER_C_RESTRICT
-# if EXPECTED_COMPILER_C_RESTRICT
-# error Expected TEST_COMPILER_C_RESTRICT
-# endif
+#if EXPECTED_COMPILER_C_RESTRICT
+#error Expected TEST_COMPILER_C_RESTRICT
+#endif
#else
-# if !EXPECTED_COMPILER_C_RESTRICT
-# error Expect no TEST_COMPILER_C_RESTRICT
-# endif
+#if !EXPECTED_COMPILER_C_RESTRICT
+#error Expect no TEST_COMPILER_C_RESTRICT
+#endif
#endif
#ifdef TEST_COMPILER_CXX_STATIC_ASSERT
diff --git a/Tests/Module/WriteCompilerDetectionHeader/main_multi.c b/Tests/Module/WriteCompilerDetectionHeader/main_multi.c
index 6f4573f..6e13fd7 100644
--- a/Tests/Module/WriteCompilerDetectionHeader/main_multi.c
+++ b/Tests/Module/WriteCompilerDetectionHeader/main_multi.c
@@ -1,22 +1,23 @@
#include "multi_file_compiler_detection.h"
-#if !defined(MULTI_COMPILER_C_FUNCTION_PROTOTYPES) || !MULTI_COMPILER_C_FUNCTION_PROTOTYPES
-# error Expected MULTI_COMPILER_C_FUNCTION_PROTOTYPES
+#if !defined(MULTI_COMPILER_C_FUNCTION_PROTOTYPES) || \
+ !MULTI_COMPILER_C_FUNCTION_PROTOTYPES
+#error Expected MULTI_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
-# error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
+#error Expected EXPECTED_COMPILER_C_FUNCTION_PROTOTYPES
#endif
#if !defined(MULTI_COMPILER_C_RESTRICT) || !MULTI_COMPILER_C_RESTRICT
-# if EXPECTED_COMPILER_C_RESTRICT
-# error Expected MULTI_COMPILER_C_RESTRICT
-# endif
+#if EXPECTED_COMPILER_C_RESTRICT
+#error Expected MULTI_COMPILER_C_RESTRICT
+#endif
#else
-# if !EXPECTED_COMPILER_C_RESTRICT
-# error Expect no MULTI_COMPILER_C_RESTRICT
-# endif
+#if !EXPECTED_COMPILER_C_RESTRICT
+#error Expect no MULTI_COMPILER_C_RESTRICT
+#endif
#endif
#ifdef MULTI_COMPILER_CXX_STATIC_ASSERT