You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@corinthia.apache.org by pm...@apache.org on 2014/12/17 14:29:26 UTC
[76/92] [abbrv] incubator-corinthia git commit: Add more skeleton
files for unit tests
Add more skeleton files for unit tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/1f9b2b17
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/1f9b2b17
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/1f9b2b17
Branch: refs/heads/stable
Commit: 1f9b2b17367a6c04034b240c3191ec838839fb96
Parents: feb4b0b
Author: Peter Kelly <pe...@uxproductivity.com>
Authored: Mon Dec 8 09:44:42 2014 +0700
Committer: Peter Kelly <pe...@uxproductivity.com>
Committed: Mon Dec 8 09:44:56 2014 +0700
----------------------------------------------------------------------
DocFormats/CMakeLists.txt | 21 ++++++++++-----
DocFormats/core/tests/css/CSSTests.c | 27 ++++++++++++++++++++
DocFormats/core/tests/html/HTMLTests.c | 27 ++++++++++++++++++++
DocFormats/core/tests/lib/LibTests.c | 27 ++++++++++++++++++++
DocFormats/core/tests/xml/XMLTests.c | 27 ++++++++++++++++++++
DocFormats/filters/latex/tests/LaTeXTests.c | 27 ++++++++++++++++++++
DocFormats/filters/ooxml/tests/word/WordTests.c | 27 ++++++++++++++++++++
DocFormats/platform/tests/PlatformTests.c | 27 ++++++++++++++++++++
consumers/dftest/src/main.c | 14 ++++++++++
9 files changed, 217 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/DocFormats/CMakeLists.txt b/DocFormats/CMakeLists.txt
index 54981f3..06e924f 100644
--- a/DocFormats/CMakeLists.txt
+++ b/DocFormats/CMakeLists.txt
@@ -54,7 +54,8 @@ set(GroupPlatform
platform/src/Apple.c
platform/src/Linux.c
platform/src/Unix.c
- platform/src/Win32.c)
+ platform/src/Win32.c
+ platform/tests/PlatformTests.c)
set(GroupCoreCSS
core/src/css/CSS.c
@@ -74,7 +75,8 @@ set(GroupCoreCSS
core/src/css/CSSStyle.c
core/src/css/CSSStyle.h
core/src/css/CSSSyntax.c
- core/src/css/CSSSyntax.h)
+ core/src/css/CSSSyntax.h
+ core/tests/css/CSSTests.c)
set(GroupCoreHTML
core/src/html/DFHTDocument.c
@@ -88,11 +90,13 @@ set(GroupCoreHTML
core/src/html/DFTidyHelper.c
core/src/html/DFTidyHelper.h
core/src/html/DFTidyWrapper.c
- core/src/html/DFTidyWrapper.h)
+ core/src/html/DFTidyWrapper.h
+ core/tests/html/HTMLTests.c)
set(GroupLaTeX
filters/latex/src/HTMLToLaTeX.c
- filters/latex/src/HTMLToLaTeX.h)
+ filters/latex/src/HTMLToLaTeX.h
+ filters/latex/tests/LaTeXTests.c)
set(GroupCoreLib
core/src/lib/DFAllocator.c
@@ -116,7 +120,8 @@ set(GroupCoreLib
core/src/lib/DFString.c
core/src/lib/DFString.h
core/src/lib/DFZipFile.c
- core/src/lib/DFZipFile.h)
+ core/src/lib/DFZipFile.h
+ core/tests/lib/LibTests.c)
set(GroupCoreNames
core/src/names/DFXMLNames.c
@@ -173,7 +178,8 @@ set(GroupOOXMLWord
filters/ooxml/src/word/WordTheme.c
filters/ooxml/src/word/WordTheme.h
filters/ooxml/src/word/WordWhitespace.c
- filters/ooxml/src/word/WordWhitespace.h)
+ filters/ooxml/src/word/WordWhitespace.h
+ filters/ooxml/tests/word/WordTests.c)
set(GroupOOXMLWordFormatting
filters/ooxml/src/word/formatting/WordCommonPr.c
@@ -218,7 +224,8 @@ set(GroupCoreXML
core/src/xml/DFNameMap.h
core/src/xml/DFXML.c
core/src/xml/DFXML.h
- core/src/xml/DFXMLForward.h)
+ core/src/xml/DFXMLForward.h
+ core/tests/xml/XMLTests.c)
add_library(DocFormats
${GroupRoot}
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/core/tests/css/CSSTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/css/CSSTests.c b/DocFormats/core/tests/css/CSSTests.c
new file mode 100644
index 0000000..6764b6a
--- /dev/null
+++ b/DocFormats/core/tests/css/CSSTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup CSSTests = {
+ "core.css", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/core/tests/html/HTMLTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/html/HTMLTests.c b/DocFormats/core/tests/html/HTMLTests.c
new file mode 100644
index 0000000..6ce53a8
--- /dev/null
+++ b/DocFormats/core/tests/html/HTMLTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup HTMLTests = {
+ "core.html", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/core/tests/lib/LibTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/lib/LibTests.c b/DocFormats/core/tests/lib/LibTests.c
new file mode 100644
index 0000000..a5870b4
--- /dev/null
+++ b/DocFormats/core/tests/lib/LibTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup LibTests = {
+ "core.lib", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/core/tests/xml/XMLTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/core/tests/xml/XMLTests.c b/DocFormats/core/tests/xml/XMLTests.c
new file mode 100644
index 0000000..fdb6592
--- /dev/null
+++ b/DocFormats/core/tests/xml/XMLTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup XMLTests = {
+ "core.xml", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/filters/latex/tests/LaTeXTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/latex/tests/LaTeXTests.c b/DocFormats/filters/latex/tests/LaTeXTests.c
new file mode 100644
index 0000000..88e50c5
--- /dev/null
+++ b/DocFormats/filters/latex/tests/LaTeXTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup LaTeXTests = {
+ "latex", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/filters/ooxml/tests/word/WordTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/filters/ooxml/tests/word/WordTests.c b/DocFormats/filters/ooxml/tests/word/WordTests.c
new file mode 100644
index 0000000..ee37413
--- /dev/null
+++ b/DocFormats/filters/ooxml/tests/word/WordTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup WordTests = {
+ "word", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/DocFormats/platform/tests/PlatformTests.c
----------------------------------------------------------------------
diff --git a/DocFormats/platform/tests/PlatformTests.c b/DocFormats/platform/tests/PlatformTests.c
new file mode 100644
index 0000000..7a060cf
--- /dev/null
+++ b/DocFormats/platform/tests/PlatformTests.c
@@ -0,0 +1,27 @@
+// Copyright 2012-2014 UX Productivity Pty Ltd
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include "DFUnitTest.h"
+#include <stddef.h>
+
+static void test_sample(void)
+{
+}
+
+TestGroup PlatformTests = {
+ "platform", {
+ { "sample", test_sample },
+ { NULL, NULL }
+ }
+};
http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/1f9b2b17/consumers/dftest/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dftest/src/main.c b/consumers/dftest/src/main.c
index 1e778af..166a048 100644
--- a/consumers/dftest/src/main.c
+++ b/consumers/dftest/src/main.c
@@ -16,9 +16,23 @@
#include <stdio.h>
extern TestGroup APITests;
+extern TestGroup CSSTests;
+extern TestGroup HTMLTests;
+extern TestGroup LibTests;
+extern TestGroup XMLTests;
+extern TestGroup LaTeXTests;
+extern TestGroup WordTests;
+extern TestGroup PlatformTests;
TestGroup *groups[] = {
&APITests,
+ &CSSTests,
+ &HTMLTests,
+ &LibTests,
+ &XMLTests,
+ &LaTeXTests,
+ &WordTests,
+ &PlatformTests,
NULL
};