Refactored DIV and VTAB relocation tests

Ran checks for current implementation on LPC1768
pull/900/head
Przemek Wirkus 2015-01-28 08:54:40 +00:00
parent a4bf0cf135
commit 4d435b94be
2 changed files with 13 additions and 8 deletions

View File

@ -17,6 +17,11 @@ const char *result_str(bool result) {
} }
int main() { int main() {
TEST_TIMEOUT(20);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(Integer constant division);
TEST_START("MBED_26");
bool result = true; bool result = true;
{ // 0xFFFFFFFF * 8 = 0x7fffffff8 { // 0xFFFFFFFF * 8 = 0x7fffffff8
@ -35,6 +40,5 @@ int main() {
printf("64bit: 0x17FFFFFFE8: expected 0x%lX got 0x%lX ... %s\r\n", values.first, test_ret, result_str(test_res)); printf("64bit: 0x17FFFFFFE8: expected 0x%lX got 0x%lX ... %s\r\n", values.first, test_ret, result_str(test_res));
} }
notify_completion(result); TEST_RESULT(result);
return 0;
} }

View File

@ -46,14 +46,17 @@ static bool test_once() {
} }
int main() { int main() {
TEST_TIMEOUT(15);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(Interrupt vector relocation);
TEST_START("MBED_A18");
// First test, no table reallocation // First test, no table reallocation
{ {
printf("Starting first test (interrupts not relocated).\r\n"); printf("Starting first test (interrupts not relocated).\r\n");
bool ret = test_once(); bool ret = test_once();
if (ret == false) { if (ret == false) {
notify_completion(false); TEST_RESULT(false);
return 1;
} }
} }
@ -65,11 +68,9 @@ int main() {
bool ret = test_once(); bool ret = test_once();
if (ret == false) { if (ret == false) {
notify_completion(false); TEST_RESULT(false);
return 1;
} }
} }
notify_completion(true); TEST_RESULT(true);
return 0;
} }