From 85752d4ec3f9b2963fe07801e07e5ec8057132a5 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Sat, 8 May 2021 12:05:08 +0800 Subject: [PATCH] add 3 bytes Collection test. --- CollectionTest.cpp | 74 ++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 65 insertions(+), 9 deletions(-) diff --git a/CollectionTest.cpp b/CollectionTest.cpp index 41e36e6..ab509e4 100644 --- a/CollectionTest.cpp +++ b/CollectionTest.cpp @@ -15,6 +15,7 @@ void out(const Collection &c) { MyEnumerator me(&c); +#if 0 const TEST_TYPE *str=me.begin(); const size_t count=me.size(); @@ -23,16 +24,32 @@ void out(const Collection &c) std::cout<<*str<<' '; ++str; } +#else + for(const TEST_TYPE &value:me) + std::cout< ul; + Collection cu3(3); - //ul.Add(1024); + for(TEST_TYPE i=0;i<10;i++) + { + char data[3]; + + data[0]='A'+i; + data[1]='a'+i; + data[2]='0'+i; + + cu3.Add(data); + out3(cu3); + } + + cu3.Insert(0,0);out3(cu3); + + std::cout<<"indexOf(Ee4) is "<