From fb2301ab5e2cf6609ea846139d12a22e26b71db7 Mon Sep 17 00:00:00 2001 From: tianfenghan Date: Mon, 11 May 2026 20:58:13 +0800 Subject: [PATCH] =?UTF-8?q?test(aot):=20=E6=B7=BB=E5=8A=A0=E6=A0=87?= =?UTF-8?q?=E5=87=86=E5=BA=93=E5=AE=B9=E5=99=A8=E7=B1=BB=E5=9E=8B=E7=9A=84?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 std::map 的基础功能测试,包括整数键和字符串键的使用 - 添加 std::unordered_map 的基础功能测试,验证哈希映射操作 - 添加 std::vector 的基础功能测试,涵盖整数和浮点数向量 - 验证容器的增删改查和类型安全特性 - 测试不同数据类型的存储和检索功能 - 确保容器大小统计和元素访问的正确性 --- tests/aot/std-map/001.phpt | 19 +++++++++++++++++++ tests/aot/std-map/002.phpt | 25 +++++++++++++++++++++++++ tests/aot/std-unordered-map/001.phpt | 19 +++++++++++++++++++ tests/aot/std-unordered-map/002.phpt | 25 +++++++++++++++++++++++++ tests/aot/std-vector/001.phpt | 26 ++++++++++++++++++++++++++ 5 files changed, 114 insertions(+) create mode 100644 tests/aot/std-map/001.phpt create mode 100644 tests/aot/std-map/002.phpt create mode 100644 tests/aot/std-unordered-map/001.phpt create mode 100644 tests/aot/std-unordered-map/002.phpt create mode 100644 tests/aot/std-vector/001.phpt diff --git a/tests/aot/std-map/001.phpt b/tests/aot/std-map/001.phpt new file mode 100644 index 00000000..99d6c148 --- /dev/null +++ b/tests/aot/std-map/001.phpt @@ -0,0 +1,19 @@ +--TEST-- +std map: 001 +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +int(2) diff --git a/tests/aot/std-map/002.phpt b/tests/aot/std-map/002.phpt new file mode 100644 index 00000000..317d6a33 --- /dev/null +++ b/tests/aot/std-map/002.phpt @@ -0,0 +1,25 @@ +--TEST-- +std map: string key +--FILE-- + +--EXPECT-- +int(10) +int(42) +int(2) +bool(true) diff --git a/tests/aot/std-unordered-map/001.phpt b/tests/aot/std-unordered-map/001.phpt new file mode 100644 index 00000000..4e0868ff --- /dev/null +++ b/tests/aot/std-unordered-map/001.phpt @@ -0,0 +1,19 @@ +--TEST-- +std unordered map: 001 +--FILE-- + +--EXPECT-- +int(42) +int(7) +int(2) diff --git a/tests/aot/std-unordered-map/002.phpt b/tests/aot/std-unordered-map/002.phpt new file mode 100644 index 00000000..ad605fcd --- /dev/null +++ b/tests/aot/std-unordered-map/002.phpt @@ -0,0 +1,25 @@ +--TEST-- +std unordered map: string key +--FILE-- + +--EXPECT-- +bool(true) +bool(true) +int(2) +int(42) diff --git a/tests/aot/std-vector/001.phpt b/tests/aot/std-vector/001.phpt new file mode 100644 index 00000000..bdbc5d40 --- /dev/null +++ b/tests/aot/std-vector/001.phpt @@ -0,0 +1,26 @@ +--TEST-- +std vector: 001 +--FILE-- + +--EXPECT-- +int(1) +int(42) +int(2) +bool(true) +bool(true)