From aad6f74db6a08ca23a9b4ee7f261a051d230bef7 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sun, 4 Sep 2022 15:05:11 +0200 Subject: fix: tests Signed-off-by: Sefa Eyeoglu --- launcher/minecraft/mod/TexturePackParse_test.cpp | 70 --------------------- .../testdata/another_test_texturefolder/pack.txt | 2 - .../mod/testdata/test_texture_pack_idk.zip | Bin 184 -> 0 bytes .../assets/minecraft/textures/blah.txt | 1 - .../mod/testdata/test_texturefolder/pack.txt | 1 - 5 files changed, 74 deletions(-) delete mode 100644 launcher/minecraft/mod/TexturePackParse_test.cpp delete mode 100644 launcher/minecraft/mod/testdata/another_test_texturefolder/pack.txt delete mode 100644 launcher/minecraft/mod/testdata/test_texture_pack_idk.zip delete mode 100644 launcher/minecraft/mod/testdata/test_texturefolder/assets/minecraft/textures/blah.txt delete mode 100644 launcher/minecraft/mod/testdata/test_texturefolder/pack.txt (limited to 'launcher') diff --git a/launcher/minecraft/mod/TexturePackParse_test.cpp b/launcher/minecraft/mod/TexturePackParse_test.cpp deleted file mode 100644 index 207c2c87..00000000 --- a/launcher/minecraft/mod/TexturePackParse_test.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// SPDX-License-Identifier: GPL-3.0-only -/* - * PolyMC - Minecraft Launcher - * Copyright (c) 2022 flowln - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 3. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -#include -#include - -#include "FileSystem.h" - -#include "TexturePack.h" -#include "tasks/LocalTexturePackParseTask.h" - -class TexturePackParseTest : public QObject { - Q_OBJECT - - private slots: - void test_parseZIP() - { - QString source = QFINDTESTDATA("testdata"); - - QString zip_rp = FS::PathCombine(source, "test_texture_pack_idk.zip"); - TexturePack pack { QFileInfo(zip_rp) }; - - TexturePackUtils::processZIP(pack); - - QVERIFY(pack.description() == "joe biden, wake up"); - } - - void test_parseFolder() - { - QString source = QFINDTESTDATA("testdata"); - - QString folder_rp = FS::PathCombine(source, "test_texturefolder"); - TexturePack pack { QFileInfo(folder_rp) }; - - TexturePackUtils::processFolder(pack); - - QVERIFY(pack.description() == "Some texture pack surely"); - } - - void test_parseFolder2() - { - QString source = QFINDTESTDATA("testdata"); - - QString folder_rp = FS::PathCombine(source, "another_test_texturefolder"); - TexturePack pack { QFileInfo(folder_rp) }; - - TexturePackUtils::process(pack); - - QVERIFY(pack.description() == "quieres\nfor real"); - } -}; - -QTEST_GUILESS_MAIN(TexturePackParseTest) - -#include "TexturePackParse_test.moc" diff --git a/launcher/minecraft/mod/testdata/another_test_texturefolder/pack.txt b/launcher/minecraft/mod/testdata/another_test_texturefolder/pack.txt deleted file mode 100644 index bbc0d271..00000000 --- a/launcher/minecraft/mod/testdata/another_test_texturefolder/pack.txt +++ /dev/null @@ -1,2 +0,0 @@ -quieres -for real \ No newline at end of file diff --git a/launcher/minecraft/mod/testdata/test_texture_pack_idk.zip b/launcher/minecraft/mod/testdata/test_texture_pack_idk.zip deleted file mode 100644 index fb4d3370..00000000 Binary files a/launcher/minecraft/mod/testdata/test_texture_pack_idk.zip and /dev/null differ diff --git a/launcher/minecraft/mod/testdata/test_texturefolder/assets/minecraft/textures/blah.txt b/launcher/minecraft/mod/testdata/test_texturefolder/assets/minecraft/textures/blah.txt deleted file mode 100644 index 8d1c8b69..00000000 --- a/launcher/minecraft/mod/testdata/test_texturefolder/assets/minecraft/textures/blah.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/launcher/minecraft/mod/testdata/test_texturefolder/pack.txt b/launcher/minecraft/mod/testdata/test_texturefolder/pack.txt deleted file mode 100644 index f6260725..00000000 --- a/launcher/minecraft/mod/testdata/test_texturefolder/pack.txt +++ /dev/null @@ -1 +0,0 @@ -Some texture pack surely \ No newline at end of file -- cgit