From f121ce1ed557a07e7383892bde6a663cb839a990 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Sat, 8 Dec 2018 14:10:18 +0100 Subject: [PATCH] add sanity asserts in regression #46 --- src/test/cpp/regression/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/cpp/regression/main.cpp b/src/test/cpp/regression/main.cpp index 016555d..2d5bd2a 100644 --- a/src/test/cpp/regression/main.cpp +++ b/src/test/cpp/regression/main.cpp @@ -686,6 +686,10 @@ public: ws->iBusAccessPatch(address,data,&error); } virtual bool dRead(int32_t address, int32_t size, uint32_t *data){ + if(size < 1 || size > 4){ + cout << "dRead size=" << size << endl; + fail(); + } if(address & (size-1) != 0) cout << "Ref did a unaligned read" << endl; if((address & 0xF0000000) == 0xF0000000){ MemRead t = periphRead.front();