summaryrefslogtreecommitdiffstats
path: root/Tests/Module/GenerateExportHeader
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/Module/GenerateExportHeader')
-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
9 files changed, 118 insertions, 77 deletions
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