From c94183f9b87a0d52b41049147079037984f29e22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=93=E8=88=AA?= <1210603696@qq.com> Date: Mon, 22 Dec 2014 10:13:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B5=8B=E8=AF=95=E7=94=A8?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TinySTL/Test/VectorTest.cpp | 11 +++++++++-- TinySTL/Test/VectorTest.h | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/TinySTL/Test/VectorTest.cpp b/TinySTL/Test/VectorTest.cpp index 3926190..a79ae88 100644 --- a/TinySTL/Test/VectorTest.cpp +++ b/TinySTL/Test/VectorTest.cpp @@ -176,7 +176,13 @@ namespace TinySTL{ v1.erase(v1.begin(), v1.begin() + 3); v2.erase(v2.begin(), v2.begin() + 3); assert(TinySTL::Test::container_equal(v1, v2)); + } + void testCase14(){ + tsVec foo(3, 100); + tsVec bar(2, 200); + assert(!(foo == bar)); + assert(foo != bar); } } } @@ -194,8 +200,9 @@ int main(){ //testCase9(); //testCase10(); //testCase11(); - testCase12(); - testCase13(); + //testCase12(); + //testCase13(); + //testCase14(); system("pause"); return 0; } \ No newline at end of file diff --git a/TinySTL/Test/VectorTest.h b/TinySTL/Test/VectorTest.h index 14ab51f..a0e5340 100644 --- a/TinySTL/Test/VectorTest.h +++ b/TinySTL/Test/VectorTest.h @@ -32,6 +32,8 @@ namespace TinySTL{ void testCase10(); void testCase11(); void testCase12(); + void testCase13(); + void testCase14(); } }