Moved apdu decode into unit test where it was being used since it is being decoded in apdu.c in normal usage.

This commit is contained in:
skarg
2006-08-10 19:58:59 +00:00
parent f80623d8c5
commit e5239e3e73
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -68,6 +68,11 @@ int abort_decode_service_request(uint8_t * apdu,
return len;
}
#ifdef TEST
#include <assert.h>
#include <string.h>
#include "ctest.h"
/* decode the whole APDU - mainly used for unit testing */
int abort_decode_apdu(uint8_t * apdu,
unsigned apdu_len, uint8_t * invoke_id, uint8_t * abort_reason)
@@ -89,11 +94,6 @@ int abort_decode_apdu(uint8_t * apdu,
return len;
}
#ifdef TEST
#include <assert.h>
#include <string.h>
#include "ctest.h"
void testAbort(Test * pTest)
{
uint8_t apdu[480] = { 0 };
+2 -2
View File
@@ -47,11 +47,11 @@ extern "C" {
int abort_decode_service_request(uint8_t * apdu,
unsigned apdu_len, uint8_t * invoke_id, uint8_t * abort_reason);
#ifdef TEST
#include "ctest.h"
int abort_decode_apdu(uint8_t * apdu,
unsigned apdu_len, uint8_t * invoke_id, uint8_t * abort_reason);
#ifdef TEST
#include "ctest.h"
void testAbort(Test * pTest);
#endif