Revision: 14715
Author: adrian.chadd
Date: Fri Jun 18 18:38:52 2010
Log: Rename vector_get_real() to vector_get(); this now does bounds checking
(as it should..)
http://code.google.com/p/lusca-cache/source/detail?r=14715
Modified:
/branches/LUSCA_HEAD/test-suite/atf/lib_Vector.c
=======================================
--- /branches/LUSCA_HEAD/test-suite/atf/lib_Vector.c Thu May 20 03:21:33
2010
+++ /branches/LUSCA_HEAD/test-suite/atf/lib_Vector.c Fri Jun 18 18:38:52
2010
@@ -78,7 +78,7 @@
}
//printf("check\n");
for (i = 0; i < 32; i++) {
- n = (int *) vector_get_real(&v, i);
+ n = (int *) vector_get(&v, i);
if (i < 16) {
//printf("%d: %p; used %d\n", i, n, v.used_count);
ATF_REQUIRE((*n) == i);
@@ -113,7 +113,7 @@
n = (int *) vector_insert(&v, i);
}
for (i = 0; i < v.used_count; i++) {
- n = (int *) vector_get_real(&v, i);
+ n = (int *) vector_get(&v, i);
ATF_REQUIRE(n != NULL);
//printf("%d: %d (%d)\n", i, (*n), i / 2);
ATF_REQUIRE_EQ( (*n), i / 2);
@@ -133,10 +133,10 @@
vector_init(&v, sizeof(int), 128);
(void) vector_append(&v);
- ATF_REQUIRE(vector_get_real(&v, 0) != NULL);
- ATF_REQUIRE(vector_get_real(&v, 1) == NULL);
- ATF_REQUIRE(vector_get_real(&v, 2) == NULL);
- ATF_REQUIRE(vector_get_real(&v, 129) == NULL);
+ ATF_REQUIRE(vector_get(&v, 0) != NULL);
+ ATF_REQUIRE(vector_get(&v, 1) == NULL);
+ ATF_REQUIRE(vector_get(&v, 2) == NULL);
+ ATF_REQUIRE(vector_get(&v, 129) == NULL);
vector_done(&v);
}
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.