mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-07 19:58:32 +09:00
[Test] (MG_Test/Program): add Sanity test
This commit is contained in:
@@ -31,3 +31,4 @@ include(GoogleTest)
|
||||
gtest_discover_tests(SanityTest)
|
||||
|
||||
add_subdirectory(Buffer)
|
||||
add_subdirectory(Program)
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
cmake_minimum_required(VERSION 3.24)
|
||||
|
||||
set(glslang_DIR /Users/swung0x48/VulkanSDK/1.4.321.0/macOS/lib/cmake/glslang)
|
||||
set(SPIRV-Tools_DIR /Users/swung0x48/VulkanSDK/1.4.321.0/macOS/lib/cmake/SPIRV-Tools)
|
||||
set(SPIRV-Tools-opt_DIR /Users/swung0x48/VulkanSDK/1.4.321.0/macOS/lib/cmake/SPIRV-Tools-opt)
|
||||
#find_package(SPIRV-Tools CONFIG REQUIRED)
|
||||
#find_package(SPIRV-Tools-opt CONFIG REQUIRED)
|
||||
find_package(glslang CONFIG)
|
||||
|
||||
add_executable(
|
||||
ProgramTest
|
||||
ProgramTest.cpp
|
||||
|
||||
${MGL_ROOT}/MobileGL/MG_Util/Converters/GLToStr/GLEnumConverter.cpp
|
||||
${MGL_ROOT}/MobileGL/MG_Util/Pipelines/ShaderCompilationPipeline.cpp
|
||||
${MGL_ROOT}/MobileGL/MG_Util/Pipelines/ProgramLinkingPipeline.cpp
|
||||
)
|
||||
|
||||
target_include_directories(ProgramTest PRIVATE
|
||||
${MGL_ROOT}/include
|
||||
${MGL_ROOT}/MobileGL
|
||||
)
|
||||
|
||||
target_link_libraries(
|
||||
ProgramTest
|
||||
GTest::gtest_main
|
||||
glslang::glslang
|
||||
)
|
||||
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(ProgramTest)
|
||||
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Created by Swung 0x48 on 2025/7/17.
|
||||
//
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "Includes.h"
|
||||
|
||||
using namespace MobileGL;
|
||||
|
||||
class ProgramTest : public ::testing::Test {
|
||||
protected:
|
||||
};
|
||||
|
||||
TEST_F(ProgramTest, Sanity) {
|
||||
ASSERT_TRUE(true);
|
||||
}
|
||||
Reference in New Issue
Block a user