feat: complete Track A zero-CMake self-hosting, full VOID_TEST migration, and bit-identical Stage 2/3 bootstrap
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 2s
VoidBuildSystem CI / build-and-test-gcc16 (push) Failing after 2s
This commit is contained in:
1 parent
fe0d1a6483
commit
5e1916dc5c
23 files changed
+945
-141
No files matched your search
+14
-14
@@ -23,7 +23,7 @@ const Json &element(const Json &value, std::size_t index) {
|
||||
std::string text(const Json &value) { return std::get<std::string>(value.value); }
|
||||
} // namespace
|
||||
|
||||
Void::Testing::Test default_profiles_and_overrides() {
|
||||
VOID_TEST(SdkDeclarations, default_profiles_and_overrides) {
|
||||
const auto profiles = Void::Build::default_profiles();
|
||||
const auto debug =
|
||||
profiles.resolve("debug", Void::Build::CompilerFamily::Clang, "linux", "aarch64");
|
||||
@@ -36,7 +36,7 @@ Void::Testing::Test default_profiles_and_overrides() {
|
||||
Void::Testing::expect_eq(release.compile_options.at(0), std::string{"-O3"});
|
||||
}
|
||||
|
||||
Void::Testing::Test rejects_invalid_profiles() {
|
||||
VOID_TEST(SdkDeclarations, rejects_invalid_profiles) {
|
||||
auto profiles = Void::Build::default_profiles();
|
||||
Void::Testing::expect_throw<std::invalid_argument>([&] { profiles.add("debug"); });
|
||||
Void::Testing::expect_throw<std::invalid_argument>([&] { profiles.add(""); });
|
||||
@@ -50,7 +50,7 @@ Void::Testing::Test rejects_invalid_profiles() {
|
||||
[&] { (void)profiles.resolve("debug", Void::Build::CompilerFamily::Gcc, "", "x86_64"); });
|
||||
}
|
||||
|
||||
Void::Testing::Test declaration_records_and_visibility() {
|
||||
VOID_TEST(SdkDeclarations, declaration_records_and_visibility) {
|
||||
Void::Build::Project project{context()};
|
||||
auto library = project.static_library("library");
|
||||
library.sources({"one.cpp", "two.cpp"})
|
||||
@@ -68,7 +68,7 @@ Void::Testing::Test declaration_records_and_visibility() {
|
||||
Void::Build::Visibility::Interface);
|
||||
}
|
||||
|
||||
Void::Testing::Test sources_are_symbolic() {
|
||||
VOID_TEST(SdkDeclarations, sources_are_symbolic) {
|
||||
Void::Build::Project project{context()};
|
||||
auto target = project.executable("symbolic");
|
||||
target.sources({"missing/../literal.cpp"}).sources(project.glob("nonexistent/**/*.cpp"));
|
||||
@@ -80,7 +80,7 @@ Void::Testing::Test sources_are_symbolic() {
|
||||
std::string{"nonexistent/**/*.cpp"});
|
||||
}
|
||||
|
||||
Void::Testing::Test handles_survive_record_growth() {
|
||||
VOID_TEST(SdkDeclarations, handles_survive_record_growth) {
|
||||
Void::Build::Project project{context()};
|
||||
auto library = project.static_library("first");
|
||||
auto dependency = project.dependency("original");
|
||||
@@ -100,7 +100,7 @@ Void::Testing::Test handles_survive_record_growth() {
|
||||
Void::Testing::expect_eq(project.dependencies().front().revision, std::string{revision});
|
||||
}
|
||||
|
||||
Void::Testing::Test rejects_cross_project_links() {
|
||||
VOID_TEST(SdkDeclarations, rejects_cross_project_links) {
|
||||
Void::Build::Project first{context()};
|
||||
Void::Build::Project second{context()};
|
||||
auto app = first.executable("app");
|
||||
@@ -111,7 +111,7 @@ Void::Testing::Test rejects_cross_project_links() {
|
||||
Void::Testing::expect(app.record().links.empty());
|
||||
}
|
||||
|
||||
Void::Testing::Test rejects_expired_handles_and_owner_moves() {
|
||||
VOID_TEST(SdkDeclarations, rejects_expired_handles_and_owner_moves) {
|
||||
static_assert(!std::is_move_constructible_v<Void::Build::Project>);
|
||||
static_assert(!std::is_copy_constructible_v<Void::Build::Project>);
|
||||
std::optional<Void::Build::Target> target;
|
||||
@@ -132,7 +132,7 @@ Void::Testing::Test rejects_expired_handles_and_owner_moves() {
|
||||
Void::Testing::expect_throw<std::logic_error>([&] { app.link(*imported); });
|
||||
}
|
||||
|
||||
Void::Testing::Test rejects_empty_and_duplicate_identifiers() {
|
||||
VOID_TEST(SdkDeclarations, rejects_empty_and_duplicate_identifiers) {
|
||||
Void::Build::Project project{context()};
|
||||
auto app = project.executable("app");
|
||||
auto dep = project.dependency("dep");
|
||||
@@ -149,7 +149,7 @@ Void::Testing::Test rejects_empty_and_duplicate_identifiers() {
|
||||
Void::Testing::expect_throw<std::invalid_argument>([&] { (void)project.glob(""); });
|
||||
}
|
||||
|
||||
Void::Testing::Test rejects_contradictory_providers() {
|
||||
VOID_TEST(SdkDeclarations, rejects_contradictory_providers) {
|
||||
Void::Build::Project project{context()};
|
||||
auto git = project.dependency("git");
|
||||
git.git("https://example.invalid/repo", Void::Build::Commit{revision}).cmake();
|
||||
@@ -170,7 +170,7 @@ Void::Testing::Test rejects_contradictory_providers() {
|
||||
Void::Testing::expect_throw<std::invalid_argument>([&] { (void)project.to_json(); });
|
||||
}
|
||||
|
||||
Void::Testing::Test json_schema_types_and_escaping() {
|
||||
VOID_TEST(SdkDeclarations, json_schema_types_and_escaping) {
|
||||
Void::Build::Project project{context()};
|
||||
std::string escaped = "quote\" slash\\ newline\n\r\t";
|
||||
for (char c = 0; c < 32; ++c)
|
||||
@@ -218,7 +218,7 @@ Void::Testing::Test json_schema_types_and_escaping() {
|
||||
std::string{"org/pkg"});
|
||||
}
|
||||
|
||||
Void::Testing::Test json_preserves_valid_utf8() {
|
||||
VOID_TEST(SdkDeclarations, json_preserves_valid_utf8) {
|
||||
// Boundary scalar values for every UTF-8 width, including either side of surrogates.
|
||||
const std::string unicode = "ASCII \xc2\x80\xdf\xbf\xe0\xa0\x80\xed\x9f\xbf"
|
||||
"\xee\x80\x80\xef\xbf\xbf\xf0\x90\x80\x80\xf4\x8f\xbf\xbf";
|
||||
@@ -240,7 +240,7 @@ Void::Testing::Test json_preserves_valid_utf8() {
|
||||
Void::Testing::expect_eq(text(member(options, unicode)), unicode);
|
||||
}
|
||||
|
||||
Void::Testing::Test json_rejects_malformed_utf8() {
|
||||
VOID_TEST(SdkDeclarations, json_rejects_malformed_utf8) {
|
||||
const std::vector<std::string> invalid{
|
||||
"\x80", "\xbf", "\xc0\x80", "\xc1\xbf", "\xc2",
|
||||
"\xc2 ", "\xe0\x80\x80", "\xe0\x9f\xbf", "\xe1\x80", "\xe1 \x80",
|
||||
@@ -276,7 +276,7 @@ Void::Testing::Test json_rejects_malformed_utf8() {
|
||||
}
|
||||
}
|
||||
|
||||
Void::Testing::Test independent_projects_and_contexts() {
|
||||
VOID_TEST(SdkDeclarations, independent_projects_and_contexts) {
|
||||
auto initial = context();
|
||||
Void::Build::Project first{initial};
|
||||
initial.name = "mutated";
|
||||
@@ -289,7 +289,7 @@ Void::Testing::Test independent_projects_and_contexts() {
|
||||
Void::Testing::expect(first.to_json() != second.to_json());
|
||||
}
|
||||
|
||||
Void::Testing::Test rejects_option_errors_without_mutation() {
|
||||
VOID_TEST(SdkDeclarations, rejects_option_errors_without_mutation) {
|
||||
Void::Build::Project project{context()};
|
||||
auto dep = project.dependency("library");
|
||||
Void::Testing::expect_throw<std::invalid_argument>([&] { dep.cmake({{"", true}}); });
|
||||
|
||||
Reference in new issue
Block a user