1.1 --- a/sourcehook/test/testlist.cpp Mon Oct 03 17:39:40 2005 +0000
1.2 +++ b/sourcehook/test/testlist.cpp Mon Oct 03 18:31:44 2005 +0000
1.3 @@ -15,14 +15,17 @@
1.4 {
1.5 Hmm *m_This;
1.6 int m_Int;
1.7 - Hmm(const Hmm &other) : m_This(this), m_Int(other.m_Int)
1.8 + Hmm(const Hmm &other) : m_Int(other.m_Int)
1.9 {
1.10 + m_This = this;
1.11 }
1.12 - Hmm(int i) : m_This(this), m_Int(i)
1.13 + Hmm(int i) : m_Int(i)
1.14 {
1.15 + m_This = this;
1.16 }
1.17 - Hmm() : m_This(this), m_Int(0)
1.18 + Hmm() : m_Int(0)
1.19 {
1.20 + m_This = this;
1.21 }
1.22 void operator = (const Hmm &other)
1.23 {
1.24 @@ -134,12 +137,13 @@
1.25
1.26 // Find
1.27 int ver = 1;
1.28 - for (HashType::iterator iter = hash.begin(); iter != hash.end(); ++iter)
1.29 + HashType::iterator iter;
1.30 + for (iter = hash.begin(); iter != hash.end(); ++iter)
1.31 CHECK_COND(iter->key == ver && iter->val == (ver++) + 5000, "Part2");
1.32
1.33 CHECK_COND(ver == mymax+1, "Part2.1");
1.34
1.35 - HashType::iterator iter = hash.find(300);
1.36 + iter = hash.find(300);
1.37 CHECK_COND(iter != hash.end() && iter->val == 300+5000, "Part3.1");
1.38 iter = hash.find(mymax+200);
1.39 CHECK_COND(iter == hash.end(), "Part3.2");