-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: sync with ecsact_common (#216)
Co-authored-by: seaubot <[email protected]> Co-authored-by: Ezekiel Warren <[email protected]>
- Loading branch information
1 parent
31ab9de
commit b97c452
Showing
23 changed files
with
212 additions
and
184 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7.1.1 | ||
7.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,23 +4,31 @@ | |
name: main | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
pull_request: | ||
merge_group: | ||
|
||
jobs: | ||
typos-check: | ||
name: Typos Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: crate-ci/[email protected] | ||
|
||
formatting-check: | ||
name: Formatting Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: jidicula/[email protected] | ||
with: { clang-format-version: "16" } | ||
- uses: greut/eclint-action@v0 | ||
- uses: jidicula/[email protected] | ||
with: { clang-format-version: "18" } | ||
|
||
test-windows: | ||
if: github.event_name == 'merge_group' | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
/Users/runneradmin/AppData/Local/bazelisk | ||
|
@@ -33,9 +41,10 @@ jobs: | |
working-directory: test | ||
|
||
test-linux: | ||
if: github.event_name == 'merge_group' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/cache@v3 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/bazelisk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
"extends": [ | ||
"github>ecsact-dev/renovate-config" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
|
||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(NoPackageStatementFirst, NoPackageStatementFirst) { | ||
auto errs = ecsact_interpret_test_files({"comment_before_package.ecsact"}); | ||
ASSERT_EQ(errs.size(), 0) // | ||
<< "Expected no errors. Instead got: " << errs[0].error_message << "\n"; | ||
} | ||
|
||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(NoPackageStatementFirst, NoPackageStatementFirst) { | ||
auto errs = ecsact_interpret_test_files({"comment_before_package.ecsact"}); | ||
ASSERT_EQ(errs.size(), 0) // | ||
<< "Expected no errors. Instead got: " << errs[0].error_message << "\n"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Comments are allowed before the package statement | ||
package test.comment_before_package; | ||
// Comments are allowed before the package statement | ||
|
||
package test.comment_before_package; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(NoPackageStatementFirst, NoPackageStatementFirst) { | ||
auto errs = | ||
ecsact_interpret_test_files({"errors/no_package_statement_first.ecsact"}); | ||
ASSERT_EQ(errs.size(), 1); | ||
ASSERT_EQ(errs[0].eval_error, ECSACT_EVAL_ERR_EXPECTED_PACKAGE_STATEMENT); | ||
} | ||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(NoPackageStatementFirst, NoPackageStatementFirst) { | ||
auto errs = | ||
ecsact_interpret_test_files({"errors/no_package_statement_first.ecsact"}); | ||
ASSERT_EQ(errs.size(), 1); | ||
ASSERT_EQ(errs[0].eval_error, ECSACT_EVAL_ERR_EXPECTED_PACKAGE_STATEMENT); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
component ExampleComponent { | ||
f32 num; | ||
} | ||
// Package statement must be first | ||
package errors.no_pkg_statement_first; | ||
component ExampleComponent { | ||
f32 num; | ||
} | ||
|
||
// Package statement must be first | ||
package errors.no_pkg_statement_first; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(InterpretError, UnknownAssociationField) { | ||
auto errs = | ||
ecsact_interpret_test_files({"errors/unknown_association_field.ecsact"}); | ||
ASSERT_EQ(errs.size(), 1); | ||
ASSERT_EQ(errs[0].eval_error, ECSACT_EVAL_ERR_FIELD_NAME_ALREADY_EXISTS); | ||
} | ||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(InterpretError, UnknownAssociationField) { | ||
auto errs = | ||
ecsact_interpret_test_files({"errors/unknown_association_field.ecsact"}); | ||
ASSERT_EQ(errs.size(), 1); | ||
ASSERT_EQ(errs[0].eval_error, ECSACT_EVAL_ERR_FIELD_NAME_ALREADY_EXISTS); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package unknown_association_field; | ||
component ComponentWithAssoc { | ||
entity foo; | ||
} | ||
system MySystem { | ||
readwrite ComponentWithAssoc with bar { | ||
readwrite ComponentWithAssoc; | ||
} | ||
} | ||
package unknown_association_field; | ||
|
||
component ComponentWithAssoc { | ||
entity foo; | ||
} | ||
|
||
system MySystem { | ||
readwrite ComponentWithAssoc with bar { | ||
readwrite ComponentWithAssoc; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
#include "ecsact/runtime/meta.hh" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(MultiPkgTest, NoErrors) { | ||
auto errs = ecsact_interpret_test_files({ | ||
"extra/imported_pkg.ecsact", | ||
"extra/runtime_test.ecsact", | ||
}); | ||
EXPECT_EQ(errs.size(), 0) // | ||
<< "Expected no errors. Instead got: " << errs[0].error_message << "\n"; | ||
|
||
EXPECT_EQ(ecsact_meta_count_packages(), 2); | ||
|
||
auto pkg_ids = ecsact::meta::get_package_ids(); | ||
for(auto pkg_id : pkg_ids) { | ||
auto pkg_name = ecsact::meta::package_name(pkg_id); | ||
|
||
if(pkg_name == "runtime_test") { | ||
EXPECT_EQ(ecsact_meta_count_dependencies(pkg_id), 1) // | ||
<< "Expected main package to have 3 dependencies. One for each import"; | ||
} else if(pkg_name == "imported.test_pkg") { | ||
} else { | ||
EXPECT_TRUE(false) << "No tests for package: " << pkg_name; | ||
} | ||
} | ||
} | ||
#include "gtest/gtest.h" | ||
#include "ecsact/interpret/eval.h" | ||
#include "ecsact/runtime/meta.hh" | ||
|
||
#include "test_lib.hh" | ||
|
||
TEST(MultiPkgTest, NoErrors) { | ||
auto errs = ecsact_interpret_test_files({ | ||
"extra/imported_pkg.ecsact", | ||
"extra/runtime_test.ecsact", | ||
}); | ||
EXPECT_EQ(errs.size(), 0) // | ||
<< "Expected no errors. Instead got: " << errs[0].error_message << "\n"; | ||
|
||
EXPECT_EQ(ecsact_meta_count_packages(), 2); | ||
|
||
auto pkg_ids = ecsact::meta::get_package_ids(); | ||
for(auto pkg_id : pkg_ids) { | ||
auto pkg_name = ecsact::meta::package_name(pkg_id); | ||
|
||
if(pkg_name == "runtime_test") { | ||
EXPECT_EQ(ecsact_meta_count_dependencies(pkg_id), 1) // | ||
<< "Expected main package to have 3 dependencies. One for each import"; | ||
} else if(pkg_name == "imported.test_pkg") { | ||
} else { | ||
EXPECT_TRUE(false) << "No tests for package: " << pkg_name; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package imported.test_pkg; | ||
component ImportedComponent { | ||
i32 num; | ||
} | ||
package imported.test_pkg; | ||
|
||
component ImportedComponent { | ||
i32 num; | ||
} | ||
|
Oops, something went wrong.