Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
f925494
small updates
Cheaterdev Jun 7, 2026
0aae4fd
cleanup
Cheaterdev Jun 7, 2026
83dc980
Create Test project infrastructure
Cheaterdev Jun 7, 2026
0b6ea35
Implement custom test framework
Cheaterdev Jun 7, 2026
a09cb3d
Fix Test project subsystem to Console
Cheaterdev Jun 7, 2026
13cf640
Change Test entry point to WinMain
Cheaterdev Jun 7, 2026
6bcb575
Update Test/Defines.h with proper layer documentation
Cheaterdev Jun 7, 2026
1c63124
Add Math.Tests module with basic arithmetic tests
Cheaterdev Jun 7, 2026
cd99cce
Integrate Log class for test output
Cheaterdev Jun 7, 2026
1639716
Add detailed test logging for execution flow
Cheaterdev Jun 7, 2026
17304cc
Initialize Log system in Test WinMain
Cheaterdev Jun 7, 2026
c8b83fa
Fix test output indentation and formatting
Cheaterdev Jun 7, 2026
239a945
Add startup and finish messages to test application
Cheaterdev Jun 7, 2026
fec28da
Log test startup to detect crashes per test
Cheaterdev Jun 7, 2026
8044112
Add Core math tests for vectors and matrices
Cheaterdev Jun 7, 2026
c5030bb
Fix Core math tests to use correct API
Cheaterdev Jun 7, 2026
38aaada
Add test hierarchy/categorization system
Cheaterdev Jun 7, 2026
d9686ba
Include Test/Defines.h in test modules
Cheaterdev Jun 7, 2026
5675003
Rename test files to follow ProjectName.ComponentName convention
Cheaterdev Jun 7, 2026
f852bee
Remove manual Defines.h includes from test modules
Cheaterdev Jun 7, 2026
b097cbd
Move test macros from module to Defines.h
Cheaterdev Jun 7, 2026
feedd65
Fix TEST macro to properly expand __LINE__ in token pasting
Cheaterdev Jun 7, 2026
a7f5021
Reorganize test files into proper folder structure
Cheaterdev Jun 7, 2026
7c8de99
Add comprehensive math tests for Core geometry
Cheaterdev Jun 7, 2026
9fd8072
Fix type names to use proper capitalization
Cheaterdev Jun 7, 2026
5bc89d2
Correct quaternion type name back to lowercase
Cheaterdev Jun 7, 2026
231acd9
Fix test API alignment with Core types and add AABB improvements
Cheaterdev Jun 7, 2026
6cea8ac
Fix quaternion test parameter order and exception handling
Cheaterdev Jun 7, 2026
28493f4
Add comprehensive serialization test suite
Cheaterdev Jun 7, 2026
c1cf11f
Clean up test summary output formatting
Cheaterdev Jun 7, 2026
7691105
Add comprehensive threading test suite
Cheaterdev Jun 7, 2026
0abc177
Add comprehensive event system test suite
Cheaterdev Jun 7, 2026
a3ac555
Add class-based event handler tests with proper destruction
Cheaterdev Jun 7, 2026
749f444
Add comprehensive FileSystem test suite
Cheaterdev Jun 7, 2026
068fc30
Add comprehensive Profiling test suite
Cheaterdev Jun 7, 2026
40d8846
Add test run step to build workflow
Cheaterdev Jun 7, 2026
fc51781
Split tests into separate workflow
Cheaterdev Jun 7, 2026
e2ae1c3
Merge test workflow into build workflow
Cheaterdev Jun 7, 2026
1bd6a93
Fix test executable name to test.exe
Cheaterdev Jun 7, 2026
b5ef01f
Remove FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 causing cache restore failure
Cheaterdev Jun 7, 2026
35736b5
Add HAL tests, stdout logger, and DStorage init
Cheaterdev Jun 7, 2026
b37a072
skip HAL if no Device
Cheaterdev Jun 7, 2026
b1e0534
fixes
Cheaterdev Jun 7, 2026
c51360e
fix skipped tests
Cheaterdev Jun 7, 2026
45f77b1
WinMain -> main
Cheaterdev Jun 7, 2026
259d06d
some texture tests
Cheaterdev Jun 8, 2026
c0c994c
triangle test
Cheaterdev Jun 8, 2026
2dab5b1
cube test
Cheaterdev Jun 8, 2026
e60b251
instancing tests
Cheaterdev Jun 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 19 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
pull_request:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

jobs:
build:
Expand Down Expand Up @@ -78,6 +76,23 @@ jobs:
if: always()
with:
name: build-output
path: |
./workdir/
path: ./workdir/
retention-days: 7

test:
runs-on: windows-2025-vs2026
needs: build

steps:
- name: Download build output
uses: actions/download-artifact@v4
with:
name: build-output
path: ./workdir

- name: Run tests
shell: powershell
working-directory: ./workdir
run: |
& ".\test.exe"
exit $LASTEXITCODE
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[![Build](https://github.com/Cheaterdev/Spectrum/actions/workflows/build.yml/badge.svg)](https://github.com/Cheaterdev/Spectrum/actions/workflows/build.yml)
[![Build](https://img.shields.io/github/actions/workflow/status/Cheaterdev/Spectrum/build.yml?job=build&label=build)](https://github.com/Cheaterdev/Spectrum/actions/workflows/build.yml)
[![Tests](https://img.shields.io/github/actions/workflow/status/Cheaterdev/Spectrum/build.yml?job=test&label=tests)](https://github.com/Cheaterdev/Spectrum/actions/workflows/build.yml)

# Spectrum

Expand Down
24 changes: 23 additions & 1 deletion main.sharpmake.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public virtual void ConfigureAll(Configuration conf, CustomTarget target)
}
else
{
conf.Options.Add(Options.Vc.Linker.LinkTimeCodeGeneration.UseLinkTimeCodeGeneration);
conf.Options.Add(Options.Vc.Compiler.Optimization.FullOptimization);
conf.Defines.Add("RETAIL");
conf.Defines.Remove("NDEBUG");
Expand All @@ -145,6 +144,7 @@ public virtual void ConfigureAll(Configuration conf, CustomTarget target)
conf.Defines.Add("PROFILING");
}


}


Expand Down Expand Up @@ -381,6 +381,27 @@ public override void ConfigureAll(Configuration conf, CustomTarget target)
}
}

[Sharpmake.Generate]
public class Test : Application
{
public Test()
{
SourceRootPath = @"[project.SharpmakeCsPath]\sources\Test";
AssemblyName = "SpectrumTest";
}

public override void ConfigureAll(Configuration conf, CustomTarget target)
{
base.ConfigureAll(conf, target);

conf.Options.Remove(Options.Vc.Linker.SubSystem.Windows);

conf.VcxprojUserFile = new Project.Configuration.VcxprojUserFileSettings();
conf.VcxprojUserFile.LocalDebuggerWorkingDirectory = @"[project.SharpmakeCsPath]\workdir";

conf.AddPublicDependency<RenderSystem>(target);
}
}

[Sharpmake.Generate]
public class SpectrumSolution : Solution
Expand Down Expand Up @@ -425,6 +446,7 @@ public void ConfigureAll(Configuration conf, CustomTarget target)

conf.AddProject<Spectrum>(target);
conf.AddProject<SIGParser>(target);
conf.AddProject<Test>(target);
conf.AddProject<Resources>(target);
}

Expand Down
5 changes: 5 additions & 0 deletions sources/Core/Log/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,11 @@ void VSOutputLogger::on_log(const LogBlock& log)
OutputDebugStringA((log.get_string() + "\n").c_str());
}

void StdoutLogger::on_log(const LogBlock& log)
{
std::cout << log.get_string() << '\n' << std::flush;
}

ConsoleLogger::ConsoleLogger()
{
even = true;
Expand Down
8 changes: 8 additions & 0 deletions sources/Core/Log/Log.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,14 @@ export {
void on_log(const LogBlock& log);
};

class StdoutLogger : public Singleton<StdoutLogger>, public LogListener
{
friend class Singleton<StdoutLogger>;
StdoutLogger() = default;
virtual ~StdoutLogger() = default;
void on_log(const LogBlock& log);
};

class ConsoleLogger : public Singleton<ConsoleLogger>, public LogListener
{
friend class Singleton<ConsoleLogger>;
Expand Down
4 changes: 4 additions & 0 deletions sources/Core/Math/Primitives/AABB.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ export
vec3 min, max;

AABB() = default;
AABB(vec3 min, vec3 max) : min(min), max(max) {}
AABB(Primitive* other);
AABB(std::function<vec3(uint)> functor, unsigned int size);

void set(Primitive* other);

vec3 center() const { return (min + max) * 0.5f; }
vec3 size() const { return max - min; }

std::shared_ptr<Primitive> clone() override;
const primitive_types get_type() const override;
float get_volume() const override;
Expand Down
2 changes: 0 additions & 2 deletions sources/HAL/API/D3D12/HAL.D3D12.CommandAllocator.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ export namespace HAL {

namespace API {
class CommandAllocator {
protected:

public:
D3D::CommandAllocator m_commandAllocator;
};
Expand Down
Loading
Loading