summaryrefslogtreecommitdiffstats
path: root/cmake/UnitTest
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2018-08-02 01:01:55 +0200
committerPetr Mrázek <peterix@gmail.com>2018-08-02 01:01:55 +0200
commit5f2d3f014a255f35fd12e86c73c8152430851baf (patch)
tree0fb5d7f8920f1a3321ef2c5bc8db9064655fad9d /cmake/UnitTest
parent6aada8adf7df5075d5838512670a0b2cc2bc12a1 (diff)
downloadMultiMC-5f2d3f014a255f35fd12e86c73c8152430851baf.tar
MultiMC-5f2d3f014a255f35fd12e86c73c8152430851baf.tar.gz
MultiMC-5f2d3f014a255f35fd12e86c73c8152430851baf.tar.lz
MultiMC-5f2d3f014a255f35fd12e86c73c8152430851baf.tar.xz
MultiMC-5f2d3f014a255f35fd12e86c73c8152430851baf.zip
NOISSUE get rid of remaining tabs
Diffstat (limited to 'cmake/UnitTest')
-rw-r--r--cmake/UnitTest/TestUtil.h20
-rw-r--r--cmake/UnitTest/generate_test_data.cmake30
2 files changed, 25 insertions, 25 deletions
diff --git a/cmake/UnitTest/TestUtil.h b/cmake/UnitTest/TestUtil.h
index 84f18a2e..a478bdde 100644
--- a/cmake/UnitTest/TestUtil.h
+++ b/cmake/UnitTest/TestUtil.h
@@ -11,16 +11,16 @@
class TestsInternal
{
public:
- static QByteArray readFile(const QString &fileName)
- {
- QFile f(fileName);
- f.open(QFile::ReadOnly);
- return f.readAll();
- }
- static QString readFileUtf8(const QString &fileName)
- {
- return QString::fromUtf8(readFile(fileName));
- }
+ static QByteArray readFile(const QString &fileName)
+ {
+ QFile f(fileName);
+ f.open(QFile::ReadOnly);
+ return f.readAll();
+ }
+ static QString readFileUtf8(const QString &fileName)
+ {
+ return QString::fromUtf8(readFile(fileName));
+ }
};
#define MULTIMC_GET_TEST_FILE(file) TestsInternal::readFile(QFINDTESTDATA(file))
diff --git a/cmake/UnitTest/generate_test_data.cmake b/cmake/UnitTest/generate_test_data.cmake
index d9250fab..d0bd4ab1 100644
--- a/cmake/UnitTest/generate_test_data.cmake
+++ b/cmake/UnitTest/generate_test_data.cmake
@@ -2,22 +2,22 @@
# variables. Create destination directory if it does not exist.
function(configure_files srcDir destDir)
- make_directory(${destDir})
+ make_directory(${destDir})
- file(GLOB templateFiles RELATIVE ${srcDir} ${srcDir}/*)
- foreach(templateFile ${templateFiles})
- set(srcTemplatePath ${srcDir}/${templateFile})
- if(NOT IS_DIRECTORY ${srcTemplatePath})
- configure_file(
- ${srcTemplatePath}
- ${destDir}/${templateFile}
- @ONLY
- NEWLINE_STYLE LF
- )
- else()
- configure_files("${srcTemplatePath}" "${destDir}/${templateFile}")
- endif()
- endforeach()
+ file(GLOB templateFiles RELATIVE ${srcDir} ${srcDir}/*)
+ foreach(templateFile ${templateFiles})
+ set(srcTemplatePath ${srcDir}/${templateFile})
+ if(NOT IS_DIRECTORY ${srcTemplatePath})
+ configure_file(
+ ${srcTemplatePath}
+ ${destDir}/${templateFile}
+ @ONLY
+ NEWLINE_STYLE LF
+ )
+ else()
+ configure_files("${srcTemplatePath}" "${destDir}/${templateFile}")
+ endif()
+ endforeach()
endfunction()
configure_files(${SOURCE} ${DESTINATION}) \ No newline at end of file