diff options
author | Mike Buland <eichlan@xagasoft.com> | 2009-09-09 23:30:44 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2009-09-09 23:30:44 +0000 |
commit | 2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0 (patch) | |
tree | df5cb77c34dcf68efcf93da1af3a71ce4e9f8705 | |
parent | 69924adf356c4377bef02d4a9a331db24701d188 (diff) | |
download | libbu++-2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0.tar.gz libbu++-2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0.tar.bz2 libbu++-2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0.tar.xz libbu++-2c1bfa4da2ae809b6580ed1d6cd420cdba2806d0.zip |
Fixed a unit test, and added some fixes and new queue functions to list, fuck it
it's easier when they're in list.
Diffstat (limited to '')
-rw-r--r-- | src/list.h | 21 | ||||
-rw-r--r-- | src/unit/fstring.unit | 2 |
2 files changed, 22 insertions, 1 deletions
@@ -263,6 +263,27 @@ namespace Bu | |||
263 | return v; | 263 | return v; |
264 | } | 264 | } |
265 | 265 | ||
266 | MyType &push( const value &v ) | ||
267 | { | ||
268 | _hardCopy(); | ||
269 | prepend( v ); | ||
270 | |||
271 | return *this; | ||
272 | } | ||
273 | |||
274 | MyType &pop() | ||
275 | { | ||
276 | _hardCopy(); | ||
277 | erase( begin() ); | ||
278 | |||
279 | return *this; | ||
280 | } | ||
281 | |||
282 | value &peek() | ||
283 | { | ||
284 | return first(); | ||
285 | } | ||
286 | |||
266 | /** | 287 | /** |
267 | * Append a value to the list. | 288 | * Append a value to the list. |
268 | *@param v (const value_type &) The value to append. | 289 | *@param v (const value_type &) The value to append. |
diff --git a/src/unit/fstring.unit b/src/unit/fstring.unit index 40b1ce2..53ae780 100644 --- a/src/unit/fstring.unit +++ b/src/unit/fstring.unit | |||
@@ -35,7 +35,7 @@ | |||
35 | unitTest( strcmp( b.getStr(), "abcdef" ) == 0 ); | 35 | unitTest( strcmp( b.getStr(), "abcdef" ) == 0 ); |
36 | } | 36 | } |
37 | 37 | ||
38 | {%shared1:fail} | 38 | {%shared1} |
39 | { | 39 | { |
40 | Bu::FString a("Hey there"); | 40 | Bu::FString a("Hey there"); |
41 | Bu::FString b( a ); | 41 | Bu::FString b( a ); |