initial commit

This commit is contained in:
Brandon Lehmann
2026-02-24 18:11:26 -05:00
commit cc49624c7a
53 changed files with 5153 additions and 0 deletions

39
tests/test_cpuid.cpp Normal file
View File

@@ -0,0 +1,39 @@
// Copyright (c) 2025-2026, Brandon Lehmann
// BSD 3-Clause License (see LICENSE)
#include "test_harness.h"
#include "cpuid.h"
#include "internal/aes_impl.h"
TEST(cpuid_detect_no_crash)
{
// Just verify detection doesn't crash
auto features = tinyaes::internal::detect_cpu_features();
(void)features;
ASSERT_TRUE(true);
}
TEST(cpuid_dispatch_encrypt_block)
{
// Verify dispatch resolves to a non-null function pointer
auto fn = tinyaes::internal::get_encrypt_block();
ASSERT_TRUE(fn != nullptr);
}
TEST(cpuid_dispatch_decrypt_block)
{
auto fn = tinyaes::internal::get_decrypt_block();
ASSERT_TRUE(fn != nullptr);
}
TEST(cpuid_dispatch_key_expand)
{
auto fn = tinyaes::internal::get_key_expand();
ASSERT_TRUE(fn != nullptr);
}
TEST(cpuid_dispatch_ctr_pipeline)
{
auto fn = tinyaes::internal::get_ctr_pipeline();
ASSERT_TRUE(fn != nullptr);
}