This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 289
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
85 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* @file | ||
* @copyright defined in eos/LICENSE | ||
*/ | ||
#pragma once | ||
#include "types.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* Increments the call count of a function in specified code/file | ||
* | ||
* @brief | ||
* @param name - | ||
*/ | ||
__attribute__((eosio_wasm_import)) | ||
void coverage_inc_fun_cnt( capi_name code, uint32_t file_num, uint32_t func_num ); | ||
|
||
__attribute__((eosio_wasm_import)) | ||
void coverage_inc_line_cnt( capi_name code, uint32_t file_num, uint32_t line_num ); | ||
|
||
__attribute__((eosio_wasm_import)) | ||
void coverage_dump(); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* @file | ||
* @copyright defined in eos/LICENSE | ||
*/ | ||
#pragma once | ||
#include <cstdlib> | ||
|
||
#include <eosio/name.hpp> | ||
|
||
namespace eosio { | ||
|
||
namespace internal_use_do_not_use { | ||
|
||
extern "C" { | ||
__attribute__((eosio_wasm_import)) | ||
void coverage_inc_fun_cnt( capi_name code, uint32_t file_num, uint32_t func_num ); | ||
|
||
__attribute__((eosio_wasm_import)) | ||
void coverage_inc_line_cnt( capi_name code, uint32_t file_num, uint32_t line_num ); | ||
|
||
__attribute__((eosio_wasm_import)) | ||
void coverage_dump(); | ||
} | ||
}; | ||
|
||
inline void coverage_inc_fun_cnt( name code, uint32_t file_num, uint32_t func_num ) { | ||
internal_use_do_not_use::coverage_inc_fun_cnt(code, file_num, func_num); | ||
} | ||
|
||
inline void coverage_inc_line_cnt( name code, uint32_t file_num, uint32_t line_num ) { | ||
internal_use_do_not_use::coverage_inc_line_cnt(code, file_num, line_num); | ||
} | ||
|
||
inline void coverage_dump() { | ||
internal_use_do_not_use::coverage_dump(); | ||
} | ||
|
||
} // namespace eosio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters