Rename files

This commit is contained in:
2026-01-22 20:56:02 +08:00
parent 8c5197c760
commit 5aa4efede7
12 changed files with 872 additions and 1604 deletions

View File

@@ -4,7 +4,7 @@
using namespace camellya;
TEST_CASE("VM - Basic arithmetic", "[vm]") {
State state;
Camellya state;
SECTION("Addition") {
REQUIRE(state.do_string("var x = 10 + 20;"));
@@ -37,7 +37,7 @@ TEST_CASE("VM - Basic arithmetic", "[vm]") {
}
TEST_CASE("VM - Variables and assignment", "[vm]") {
State state;
Camellya state;
SECTION("Variable declaration and initialization") {
REQUIRE(state.do_string("var a = 42;"));
@@ -57,7 +57,7 @@ TEST_CASE("VM - Variables and assignment", "[vm]") {
}
TEST_CASE("VM - String operations", "[vm]") {
State state;
Camellya state;
SECTION("String concatenation") {
REQUIRE(state.do_string(R"(var greeting = "Hello" + " " + "World";)"));
@@ -70,7 +70,7 @@ TEST_CASE("VM - String operations", "[vm]") {
}
TEST_CASE("VM - Comparison operators", "[vm]") {
State state;
Camellya state;
SECTION("Equality") {
REQUIRE(state.do_string("var eq = 10 == 10;"));
@@ -92,7 +92,7 @@ TEST_CASE("VM - Comparison operators", "[vm]") {
}
TEST_CASE("VM - Lists", "[vm]") {
State state;
Camellya state;
SECTION("Create list") {
REQUIRE(state.do_string("var numbers = [1, 2, 3, 4, 5];"));
@@ -114,7 +114,7 @@ TEST_CASE("VM - Lists", "[vm]") {
}
TEST_CASE("VM - Maps", "[vm]") {
State state;
Camellya state;
SECTION("Create map") {
REQUIRE(state.do_string(R"(var person = {"name": "Alice", "age": "30"};)"));
@@ -135,7 +135,7 @@ TEST_CASE("VM - Maps", "[vm]") {
}
TEST_CASE("VM - If statements", "[vm]") {
State state;
Camellya state;
SECTION("If branch taken") {
REQUIRE(state.do_string(R"(
@@ -163,7 +163,7 @@ TEST_CASE("VM - If statements", "[vm]") {
}
TEST_CASE("VM - While loops", "[vm]") {
State state;
Camellya state;
SECTION("While loop") {
REQUIRE(state.do_string(R"(
@@ -180,7 +180,7 @@ TEST_CASE("VM - While loops", "[vm]") {
}
TEST_CASE("VM - Native functions", "[vm]") {
State state;
Camellya state;
SECTION("len function") {
REQUIRE(state.do_string(R"(