normalize includes: tests

This commit is contained in:
brainiac 2025-12-17 09:36:01 -08:00 committed by Alex
parent 2c6d8795f9
commit 0b8369c858
13 changed files with 38 additions and 62 deletions

View File

@ -22,6 +22,7 @@ set(tests_headers
add_executable(tests ${tests_sources} ${tests_headers})
target_link_libraries(tests common cppunit)
target_include_directories(tests PRIVATE ..)
install(TARGETS tests RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_ATOBOOL_H
#define __EQEMU_TESTS_ATOBOOL_H
#pragma once
#include "common/strings.h"
#include "cppunit/cpptest.h"
#include "../common/strings.h"
class atoboolTest : public Test::Suite {
typedef void(atoboolTest::*TestFunction)(void);
@ -99,5 +98,3 @@ public:
}
};
#endif

View File

@ -36,3 +36,4 @@ if(UNIX)
endif()
set(LIBRARY_OUTPUT_PATH ../../bin)
set_property(TARGET cppunit PROPERTY FOLDER contrib)

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_DATA_VERIFICATION_H
#define __EQEMU_TESTS_DATA_VERIFICATION_H
#pragma once
#include "common/data_verification.h"
#include "cppunit/cpptest.h"
#include "../common/data_verification.h"
class DataVerificationTest : public Test::Suite {
typedef void(DataVerificationTest::*TestFunction)(void);
@ -104,5 +103,3 @@ public:
TEST_ASSERT(!EQ::ValueWithin(value_i, 600, 900));
}
};
#endif

View File

@ -16,12 +16,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_FIXED_MEMORY_H
#define __EQEMU_TESTS_FIXED_MEMORY_H
#pragma once
#include "common/fixed_memory_hash_set.h"
#include "common/item_instance.h"
#include "cppunit/cpptest.h"
#include "../common/fixed_memory_hash_set.h"
#include "../common/item_instance.h"
class FixedMemoryHashTest : public Test::Suite {
typedef void(FixedMemoryHashTest::*TestFunction)(void);
@ -233,5 +232,3 @@ private:
uint8 *data_;
size_t size_;
};
#endif

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_FIXED_MEMORY_VARIABLE_H
#define __EQEMU_TESTS_FIXED_MEMORY_VARIABLE_H
#pragma once
#include "common/fixed_memory_variable_hash_set.h"
#include "cppunit/cpptest.h"
#include "../common/fixed_memory_variable_hash_set.h"
struct test_struct {
char name[512];
@ -129,5 +128,3 @@ private:
uint8 *data_;
uint32 size_;
};
#endif

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_HEXTOI_32_64_H
#define __EQEMU_TESTS_HEXTOI_32_64_H
#pragma once
#include "common/strings.h"
#include "cppunit/cpptest.h"
#include "../common/strings.h"
class hextoi_32_64_Test : public Test::Suite {
typedef void(hextoi_32_64_Test::*TestFunction)(void);
@ -209,5 +208,3 @@ public:
}
};
#endif

View File

@ -16,12 +16,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_IPC_MUTEX_H
#define __EQEMU_TESTS_IPC_MUTEX_H
#pragma once
#include "common/eqemu_config.h"
#include "common/ipc_mutex.h"
#include "cppunit/cpptest.h"
#include "../common/ipc_mutex.h"
#include "../common/eqemu_config.h"
extern const EQEmuConfig *Config;
@ -63,5 +62,3 @@ public:
TEST_ASSERT(!mutex.Unlock());
}
};
#endif

View File

@ -16,22 +16,23 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "tests/atobool_test.h"
#include "tests/data_verification_test.h"
#include "tests/fixed_memory_test.h"
#include "tests/fixed_memory_variable_test.h"
#include "tests/hextoi_32_64_test.h"
#include "tests/ipc_mutex_test.h"
#include "tests/memory_mapped_file_test.h"
#include "tests/skills_util_test.h"
#include "tests/string_util_test.h"
#include "tests/task_state_test.h"
#include "common/path_manager.h"
#include "common/platform.h"
#include <iostream>
#include <fstream>
#include <memory>
#include "../common/platform.h"
#include "../common/path_manager.h"
#include "memory_mapped_file_test.h"
#include "ipc_mutex_test.h"
#include "fixed_memory_test.h"
#include "fixed_memory_variable_test.h"
#include "atobool_test.h"
#include "hextoi_32_64_test.h"
#include "string_util_test.h"
#include "data_verification_test.h"
#include "skills_util_test.h"
#include "task_state_test.h"
const EQEmuConfig *Config;

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_MEMORY_MAPPED_FILE_H
#define __EQEMU_TESTS_MEMORY_MAPPED_FILE_H
#pragma once
#include "common/memory_mapped_file.h"
#include "cppunit/cpptest.h"
#include "../common/memory_mapped_file.h"
class MemoryMappedFileTest : public Test::Suite {
typedef void(MemoryMappedFileTest::*TestFunction)(void);
@ -56,5 +55,3 @@ public:
TEST_ASSERT(val == 562);
}
};
#endif

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_SKILLS_UTILS_H
#define __EQEMU_TESTS_SKILLS_UTILS_H
#pragma once
#include "common/skills.h"
#include "cppunit/cpptest.h"
#include "../common/skills.h"
class SkillsUtilsTest: public Test::Suite {
typedef void(SkillsUtilsTest::*TestFunction)(void);
@ -44,5 +43,3 @@ public:
TEST_ASSERT(!EQ::skills::IsSpecializedSkill(EQ::skills::SkillConjuration))
}
};
#endif

View File

@ -16,11 +16,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __EQEMU_TESTS_STRING_UTIL_H
#define __EQEMU_TESTS_STRING_UTIL_H
#pragma once
#include "common/strings.h"
#include "cppunit/cpptest.h"
#include "../common/strings.h"
class StringUtilTest : public Test::Suite {
typedef void(StringUtilTest::*TestFunction)(void);
@ -135,5 +134,3 @@ public:
TEST_ASSERT_EQUALS(Strings::IsNumber("18446744073709551616.0f"), false); // 64
}
};
#endif

View File

@ -1,9 +1,9 @@
#pragma once
#include "common/eqemu_logsys.h"
#include "common/shared_tasks.h"
#include "common/tasks.h"
#include "cppunit/cpptest.h"
#include "../common/eqemu_logsys.h"
#include "../common/tasks.h"
#include "../common/shared_tasks.h"
class TaskStateTest: public Test::Suite
{