Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #642 from EOSIO/native-tester-macro-fixes-develop
Browse files Browse the repository at this point in the history
Fixes to native tester macros - develop
  • Loading branch information
arhag authored Aug 28, 2019
2 parents 0e44738 + 8b63a0b commit e38e925
Show file tree
Hide file tree
Showing 19 changed files with 168 additions and 548 deletions.
17 changes: 10 additions & 7 deletions libraries/native/crt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ eosio::cdt::output_stream std_err;
extern "C" {
int main(int, char**);
char* _mmap();

static jmp_buf env;
static jmp_buf test_env;
static volatile int jmp_ret;
Expand All @@ -25,7 +25,8 @@ extern "C" {
void ___putc(char c);
bool ___disable_output;
bool ___has_failed;

bool ___earlier_unit_test_has_failed;

void* __get_heap_base() {
return ___heap_base_ptr;
}
Expand Down Expand Up @@ -79,6 +80,8 @@ extern "C" {
___pages = 1;
___disable_output = false;
___has_failed = false;
___earlier_unit_test_has_failed = false;

// preset the print functions
intrinsics::set_intrinsic<intrinsics::prints_l>([](const char* cs, uint32_t l) {
_prints_l(cs, l, eosio::cdt::output_stream_kind::std_out);
Expand Down Expand Up @@ -106,9 +109,9 @@ extern "C" {
memcpy(buff, ret.c_str(), ret.size());
v -= (int)v;
buff[ret.size()] = '.';
size_t size = ret.size();
size_t size = ret.size();
for (size_t i=size+1; i < size+10; i++) {
v *= 10;
v *= 10;
buff[i] = ((int)v)+'0';
v -= (int)v;
}
Expand All @@ -120,9 +123,9 @@ extern "C" {
memcpy(buff, ret.c_str(), ret.size());
v -= (long)v;
buff[ret.size()] = '.';
size_t size = ret.size();
size_t size = ret.size();
for (size_t i=size+1; i < size+10; i++) {
v *= 10;
v *= 10;
buff[i] = ((int)v)+'0';
v -= (int)v;
}
Expand Down Expand Up @@ -167,7 +170,7 @@ extern "C" {
}
return ret_val;
}

extern "C" void* memset(void*, int, size_t);
extern "C" void __bzero(void* to, size_t cnt) {
char* cp{static_cast<char*>(to)};
Expand Down
31 changes: 0 additions & 31 deletions libraries/native/crt.hpp

This file was deleted.

45 changes: 0 additions & 45 deletions libraries/native/intrinsics.hpp

This file was deleted.

178 changes: 0 additions & 178 deletions libraries/native/intrinsics_def.hpp

This file was deleted.

Loading

0 comments on commit e38e925

Please sign in to comment.