summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2009-02-21 12:25:43 +0000
committerJürg Billeter <juergbi@src.gnome.org>2009-02-21 12:25:43 +0000
commit20dd13db08351238bc94fdaa38b80faf51b7c376 (patch)
tree2e223e73a0e4e5211fd09eea14f588d1e35abb81
parent2dee3459f915e618ae254cd3faeeaf044d4f5e8e (diff)
downloadlibgee-20dd13db08351238bc94fdaa38b80faf51b7c376.tar.gz
Fix test cases to avoid testing for implementation details
2009-02-21 Jürg Billeter <j@bitron.ch> * tests/testarraylist.vala: Fix test cases to avoid testing for implementation details svn path=/trunk/; revision=41
-rw-r--r--ChangeLog6
-rw-r--r--tests/testarraylist.vala16
2 files changed, 6 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index d3683a4..cc8ce06 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-21 Jürg Billeter <j@bitron.ch>
+
+ * tests/testarraylist.vala:
+
+ Fix test cases to avoid testing for implementation details
+
2009-01-27 Jürg Billeter <j@bitron.ch>
* gee/arraylist.vala:
diff --git a/tests/testarraylist.vala b/tests/testarraylist.vala
index 9850a6a..8cdc5d2 100644
--- a/tests/testarraylist.vala
+++ b/tests/testarraylist.vala
@@ -23,9 +23,6 @@
using GLib;
using Gee;
-const string INDEX_OUT_OF_RANGE = "*index >= 0 && index < self->priv->_size*";
-const string INSERT_INDEX_OUT_OF_RANGE = "*index >= 0 && index <= self->priv->_size*";
-
void test_arraylist_get () {
var arraylistOfString = new ArrayList<string> ();
@@ -35,7 +32,6 @@ void test_arraylist_get () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
// Check get for valid index in list with one element
arraylistOfString.add ("1");
@@ -47,7 +43,6 @@ void test_arraylist_get () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
// Check get for invalid index number
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT | TestTrapFlags.SILENCE_STDERR)) {
@@ -55,7 +50,6 @@ void test_arraylist_get () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
// Check get for valid indexes in list with multiple element
arraylistOfString.add ("2");
@@ -72,7 +66,6 @@ void test_arraylist_get () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
}
void test_arraylist_set () {
@@ -85,7 +78,6 @@ void test_arraylist_set () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
assert (arraylistOfString.size == 0);
// Check set when one item is in list
@@ -104,7 +96,6 @@ void test_arraylist_set () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
assert (arraylistOfString.size == 1);
}
@@ -118,7 +109,6 @@ void test_arraylist_insert () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INSERT_INDEX_OUT_OF_RANGE);
// Inserting at index 0
assert (arraylistOfString.size == 0);
@@ -143,7 +133,6 @@ void test_arraylist_insert () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INSERT_INDEX_OUT_OF_RANGE);
// Check insert to the end
arraylistOfString.insert (3, "20");
@@ -158,7 +147,6 @@ void test_arraylist_insert () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INSERT_INDEX_OUT_OF_RANGE);
}
@@ -171,14 +159,12 @@ void test_arraylist_remove_at () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT | TestTrapFlags.SILENCE_STDERR)) {
arraylistOfString.remove_at (1);
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
// add 5 items
arraylistOfString.add ("1");
@@ -215,7 +201,6 @@ void test_arraylist_remove_at () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
// Check remove_at when invalid index
if (Test.trap_fork (0, TestTrapFlags.SILENCE_STDOUT | TestTrapFlags.SILENCE_STDERR)) {
@@ -223,7 +208,6 @@ void test_arraylist_remove_at () {
return;
}
Test.trap_assert_failed ();
- Test.trap_assert_stderr (INDEX_OUT_OF_RANGE);
}
void test_arraylist_index_of () {