diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 06:22:49 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 06:24:45 +0100 |
| commit | 9ff9bf184558f47f83c44196a05983a49f5bdf16 (patch) | |
| tree | 98b7a0dce73cf5a3a4674370c20c695aac6e3963 /test/test_02_linker | |
| parent | b64851f5c5654f9f28bd18b42155e5daea8c7e50 (diff) | |
[FEAT] CompilerKit testing coverage additions and 64-bit assembler patches.compiler_kit-test-additions
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'test/test_02_linker')
| -rw-r--r-- | test/test_02_linker/.gitkeep | 0 | ||||
| -rw-r--r-- | test/test_02_linker/CMakeLists.txt | 23 | ||||
| -rw-r--r-- | test/test_02_linker/linker.test.cc | 28 |
3 files changed, 0 insertions, 51 deletions
diff --git a/test/test_02_linker/.gitkeep b/test/test_02_linker/.gitkeep deleted file mode 100644 index e69de29..0000000 --- a/test/test_02_linker/.gitkeep +++ /dev/null diff --git a/test/test_02_linker/CMakeLists.txt b/test/test_02_linker/CMakeLists.txt deleted file mode 100644 index 0ad69e0..0000000 --- a/test/test_02_linker/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -cmake_minimum_required(VERSION 3.10) -project(NeCTILinkerTest) - -include(FetchContent) -FetchContent_Declare( - googletest - URL https://github.com/google/googletest/archive/refs/tags/v1.14.0.zip -) - -# For Windows: Prevent overriding the parent project's compiler/linker settings -set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -FetchContent_MakeAvailable(googletest) - -enable_testing() - -add_executable(LinkerTestBasic linker.test.cc) -target_link_libraries(LinkerTestBasic gtest_main) - -set_property(TARGET LinkerTestBasic PROPERTY CXX_STANDARD 20) -target_include_directories(LinkerTestBasic PUBLIC ../../) - -include(GoogleTest) -gtest_discover_tests(LinkerTestBasic) diff --git a/test/test_02_linker/linker.test.cc b/test/test_02_linker/linker.test.cc deleted file mode 100644 index bade75b..0000000 --- a/test/test_02_linker/linker.test.cc +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2024-2025, Amlal El Mahrouss (amlal@nekernel.org) -// Licensed under the Apache License, Version 2.0 (See accompanying -// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) -// Official repository: https://github.com/ne-foss-org/nectar - -/// @brief Linker Unit test, from the C++ unit to the final executable. -/// @author Amlal El Mahrouss - -#include <gtest/gtest.h> - -/// compile -TEST(LinkerTest, BasicLinkTestCompile) { - auto expr = std::system("pef-amd64-cxxdrv test_samples/sample.cc"); - EXPECT_TRUE(expr == 0) << "C++ Driver did not compile the easy C++ unit."; -} - -/// assemble -TEST(LinkerTest, BasicLinkTestAssemble) { - auto expr = std::system("asm -asm:x64 test_samples/sample.cc.pp.masm"); - EXPECT_TRUE(expr == 0) << "Assembler did not assemble the easy asm unit."; -} - -/// link -TEST(LinkerTest, BasicLinkTestLink) { - auto expr = std::system( - "ld64 -amd64 test_samples/sample.cc.pp.obj -start __NECTAR_main -output main.exec"); - EXPECT_TRUE(expr == 0) << "Linker did not link the easy object."; -} |
