aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/array_SUITE.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <[email protected]>2009-11-26 18:00:47 +0100
committerDan Gudmundsson <[email protected]>2009-11-26 18:00:47 +0100
commit8f554b5f5cd31c253bd27abb117596929269d157 (patch)
tree77f56fa2f1cba0cb767c41133c8bcc7022dbee43 /lib/stdlib/test/array_SUITE.erl
parent84adefa331c4159d432d22840663c38f155cd4c1 (diff)
downloadotp-8f554b5f5cd31c253bd27abb117596929269d157.tar.gz
otp-8f554b5f5cd31c253bd27abb117596929269d157.tar.bz2
otp-8f554b5f5cd31c253bd27abb117596929269d157.zip
Added more tests for array:reset/2.
Code coverage was bad for my new optimizations.
Diffstat (limited to 'lib/stdlib/test/array_SUITE.erl')
-rw-r--r--lib/stdlib/test/array_SUITE.erl16
1 files changed, 11 insertions, 5 deletions
diff --git a/lib/stdlib/test/array_SUITE.erl b/lib/stdlib/test/array_SUITE.erl
index 7cfdcf6dfd..e7cfc65be1 100644
--- a/lib/stdlib/test/array_SUITE.erl
+++ b/lib/stdlib/test/array_SUITE.erl
@@ -384,11 +384,17 @@ set_get_test_() ->
?_assert(array:get(0, set(0, 42, set(0, 17, new()))) =:= 42),
- ?_assert(array:get(0, reset(0, new())) =:= undefined),
- ?_assert(array:get(0, reset(0, set(0, 17, new()))) =:= undefined),
- ?_assert(array:get(0, reset(0, new({default,42}))) =:= 42),
- ?_assert(array:get(0, reset(0, set(0, 17, new({default,42}))))
- =:= 42)
+ ?_assertError(badarg, array:get(0, reset(11, new([{size,10}])))),
+ ?_assertError(badarg, array:get(0, reset(-1, new([{size,10}])))),
+ ?_assert(array:get(0, reset(0, new())) =:= undefined),
+ ?_assert(array:get(0, reset(0, set(0, 17, new()))) =:= undefined),
+ ?_assert(array:get(0, reset(9, set(9, 17, new()))) =:= undefined),
+ ?_assert(array:get(0, reset(11, set(11, 17, new()))) =:= undefined),
+ ?_assert(array:get(0, reset(11, set(12, 17, new()))) =:= undefined),
+ ?_assert(array:get(0, reset(1, set(12, 17, new()))) =:= undefined),
+ ?_assert(array:get(0, reset(11, new())) =:= undefined),
+ ?_assert(array:get(0, reset(0, set(0, 17, new({default,42})))) =:= 42),
+ ?_assert(array:get(0, reset(0, new({default,42}))) =:= 42)
].
to_list_test_() ->