diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-08 06:28:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-08 06:28:47 +0100 |
| commit | 1dce8ad72f9cc534e300c94cb5a63619d19ad12b (patch) | |
| tree | 98b7a0dce73cf5a3a4674370c20c695aac6e3963 /src/CompilerKit/test/Compilers/NectarCodegen.test.cpp | |
| parent | 74c41c56e724806ded5c4295080e48500fe37055 (diff) | |
| parent | 9ff9bf184558f47f83c44196a05983a49f5bdf16 (diff) | |
Merge pull request #65 from ne-foss-org/compiler_kit-test-additions
[FEAT] CompilerKit testing coverage additions.
Diffstat (limited to 'src/CompilerKit/test/Compilers/NectarCodegen.test.cpp')
| -rw-r--r-- | src/CompilerKit/test/Compilers/NectarCodegen.test.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp b/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp new file mode 100644 index 0000000..27a908e --- /dev/null +++ b/src/CompilerKit/test/Compilers/NectarCodegen.test.cpp @@ -0,0 +1,20 @@ +// Copyright 2024-2026, 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 Codegen Unit test, from the C++ unit to the final executable. +/// @author Amlal El Mahrouss + +#include <gtest/gtest.h> + +TEST(CodegenTest, BasicCodegenTestGrep) { + // Compile C++ source to assembly + auto compile_result = std::system("pef-amd64-necdrv ../../../../snippets/test_snippets/inner.nc > /dev/null 2>&1"); + EXPECT_TRUE(compile_result == 0) << "C++ compiler driver failed to compile sample.cc"; +} + +TEST(CodegenTest, BasicCodegenTestAssemble) { + auto expr = std::system("pef-amd64-asm ../../../../snippets/test_snippets/inner.masm > /dev/null 2>&1"); + EXPECT_TRUE(expr == 0) << "ASM Driver did not compile the easy ASM unit."; +} |
