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

@@ -7,7 +7,7 @@
using namespace camellya;
TEST_CASE("basic arithmetic", "[script]") {
State state;
Camellya state;
const char *script = R"(
var x = 10;
var y = 20;
@@ -26,7 +26,7 @@ TEST_CASE("basic arithmetic", "[script]") {
}
TEST_CASE("basic function", "[script][func]") {
State state;
Camellya state;
const char *script = R"(
func add(number x, number y) -> number {
return x + y;
@@ -46,7 +46,7 @@ TEST_CASE("basic function", "[script][func]") {
}
TEST_CASE("list indexing is 0-based", "[list]") {
State state;
Camellya state;
const char *script = R"(
var numbers = [10, 20, 30];
)";
@@ -75,7 +75,7 @@ TEST_CASE("list indexing is 0-based", "[list]") {
}
TEST_CASE("class init is called on declaration", "[class][init]") {
State state;
Camellya state;
const char *script = R"(
class Person {
var age : number;
@@ -124,7 +124,7 @@ TEST_CASE("class init is called on declaration", "[class][init]") {
}
TEST_CASE("interpreter performance: simple loop", "[perf][script]") {
State state;
Camellya state;
const char *script = R"(
func sum_to(number n) -> number {
var s = 0;
@@ -151,7 +151,7 @@ TEST_CASE("interpreter performance: simple loop", "[perf][script]") {
}
TEST_CASE("loop break", "[script][loop]") {
State state;
Camellya state;
const char *script = R"(
var sum = 0;
for (var i = 0; i < 10; i = i + 1) {
@@ -170,7 +170,7 @@ TEST_CASE("loop break", "[script][loop]") {
}
TEST_CASE("loop continue", "[script][loop]") {
State state;
Camellya state;
const char *script = R"(
var sum = 0;
for (var i = 0; i < 5; i = i + 1) {
@@ -189,7 +189,7 @@ TEST_CASE("loop continue", "[script][loop]") {
}
TEST_CASE("while break and continue", "[script][loop]") {
State state;
Camellya state;
const char *script = R"(
var i = 0;
var sum = 0;