diff options
Diffstat (limited to 'src/unit')
-rw-r--r-- | src/unit/hash.unit | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/unit/hash.unit b/src/unit/hash.unit index e3d7e42..124b074 100644 --- a/src/unit/hash.unit +++ b/src/unit/hash.unit | |||
@@ -84,4 +84,17 @@ suite Hash | |||
84 | printf(" - \"%s\" = %d\n", i.getKey().getStr(), i.getValue() ); | 84 | printf(" - \"%s\" = %d\n", i.getKey().getStr(), i.getValue() ); |
85 | } */ | 85 | } */ |
86 | } | 86 | } |
87 | |||
88 | test copy | ||
89 | { | ||
90 | StrIntHash h; | ||
91 | h.insert("hello", 55 ); | ||
92 | h.insert("goodbye", -1812 ); | ||
93 | |||
94 | StrIntHash h2 = h; | ||
95 | unitTest( h2.isCoreShared( h ) ); | ||
96 | |||
97 | StrIntHash h3 = h.clone(); | ||
98 | unitTest( !h3.isCoreShared( h ) ); | ||
99 | } | ||
87 | } | 100 | } |