Paweł Bylica
4ac70471ec
cpp: Rename literal suffixes: _addr -> _address, _b32 -> _bytes32
2019-07-24 13:17:28 +02:00
Paweł Bylica
c358c4a024
cpp: Add user-defined literals for basic types
2019-07-24 13:17:27 +02:00
Paweł Bylica
87f2c680cb
test: Bring back the unit tests of deprecated features
2019-07-24 13:06:37 +02:00
Paweł Bylica
7e4db85487
cpp: Deprecate helpers.hpp
2019-07-24 13:06:36 +02:00
Paweł Bylica
279c1cd6e7
test: Move an unit test from "helpers" to "cpp"
2019-07-23 14:07:44 +02:00
Paweł Bylica
6b46dfb7b0
test: Do not include helpers.hpp
2019-07-23 14:07:44 +02:00
Paweł Bylica
18e6dabe73
cpp: Add is_zero() and explicit bool() for basic types
2019-07-23 14:07:43 +02:00
Paweł Bylica
635aebeb66
cpp: Add std::hash specializations for basic types
2019-07-23 14:07:43 +02:00
Paweł Bylica
0bde57ec09
cpp: Basic types comparisons
2019-07-23 14:07:42 +02:00
Paweł Bylica
e74f42e2ef
cpp: Add basic types with default constructor
2019-07-23 14:07:42 +02:00
Alex Beregszaszi
be56b092b5
examples: Move example_vm into the examples/example_vm subdirectory
2019-07-23 12:16:44 +01:00
Paweł Bylica
6a92cb8b38
instructions: Add tests for Istanbul
2019-07-23 12:51:00 +02:00
Paweł Bylica
7e2fdd5dc1
instructions: Add tests for Petersburg
2019-07-23 12:50:31 +02:00
Paweł Bylica
ed33e98dd8
instructions: Add systematic tests to compare with prev revisions
2019-07-23 12:50:31 +02:00
Paweł Bylica
e1ff8cb007
cpp: Add unit test for evmc::vm move to itself
2019-07-03 19:37:17 +02:00
Paweł Bylica
1f3243a55e
cpp: Allow checking if evmc::vm is valid
2019-07-03 19:37:16 +02:00
Paweł Bylica
fff439a53b
cpp: Allow moving evmc::vm
2019-07-03 19:37:16 +02:00
Paweł Bylica
4381f339d4
test: Rework tests for 32-bit architectures support
2019-06-27 14:02:06 +02:00
Paweł Bylica
52689e049e
helpers: Extend fnv1a implementation to support 32-bit architectures
2019-06-27 14:02:05 +02:00
Paweł Bylica
fb471ef3e7
loader: Standardize configuration syntax and add evmc_load_and_configure()
2019-06-27 13:43:51 +02:00
Paweł Bylica
45da8cfce8
loader: Use strcpy_sx() everywhere
...
Previously we used strcpy_s() standard library function on Windows, but it triggers some additional handlers in some cases. To have the same behavior use strcpy_sx() everywhere.
2019-06-27 13:39:43 +02:00
Paweł Bylica
a31c82373f
test: Rewrite an unit test to avoid UBSan warning
...
Previously in the last iteration of the for loop the value EVMC_MAX_REVISION + 1 is assigned to rev of type evmc_revision what triggers an UBSan warning.
2019-06-27 10:18:51 +02:00
Paweł Bylica
81db59cede
loader: Make error_code in evmc_load_and_create() optional
2019-06-05 16:07:49 +02:00
Paweł Bylica
8c3b3e61e6
loader: Change strcpy_sx() to be limited version of strcpy_s()
...
The strcpy_sx() now reports errors and behaves as strcpy_s() when buffer is too small (nulls the buffer). But it does not have all the checks.
2019-05-31 08:15:17 +02:00
Paweł Bylica
5757da5859
loader: Expose strcpy_sx() for testing
2019-05-31 08:15:17 +02:00
Paweł Bylica
7b02081f2e
loader: Destroy VM with incompatible ABI
...
When a VM is loaded but turns out is has incompatible ABI version it should be destroyed before reporting the loading error and returning a null handle.
Fixes https://github.com/ethereum/evmc/issues/305
2019-05-30 14:21:04 +02:00
Paweł Bylica
ba10da07d0
loader: Use new VM mock with wrong ABI version
2019-05-30 14:15:20 +02:00
Paweł Bylica
591ac7c3a8
loader: Add more interesting VM mocks for unit tests
2019-05-30 14:10:00 +02:00
Paweł Bylica
6292d1780e
cpp: Add vm::get_capabilities() method
2019-05-29 13:11:52 +02:00
Paweł Bylica
594da7553e
cpp: Rename result::raw() to result::release_raw()
2019-05-16 08:55:55 +02:00
Paweł Bylica
8423fac003
Merge branch 'release/6.2'
...
# Conflicts:
# .bumpversion.cfg
# CHANGELOG.md
# CMakeLists.txt
# bindings/rust/evmc-sys/Cargo.toml
# bindings/rust/evmc-vm/Cargo.toml
2019-05-16 08:55:35 +02:00
Paweł Bylica
7b42c81f53
cmake: Add evmc/ prefix to ctest names
2019-05-15 14:45:10 +02:00
Paweł Bylica
3c91910f52
cpp: Add unit test for moving evmc::result
2019-05-14 17:57:59 +02:00
Paweł Bylica
577340763c
cpp: Include <vector> to show MSVC compilation error
...
This is related to misuse of `std::swap<evmc_result>`. We should not use explicit template arguments, because this disabled SFINAE and forces instantiation of all overloads.
2019-05-14 16:13:00 +02:00
Paweł Bylica
60c666a612
cpp: Add unit test for evmc::result RAII
2019-05-14 16:13:00 +02:00
Paweł Bylica
3b834de095
helpers: Handle results with null release() method
2019-05-09 22:14:20 +02:00
Paweł Bylica
d0a92e6202
vmtester: Workaround MSVC C++17 compilation issue
2019-05-06 12:33:04 +02:00
Paweł Bylica
489d832a5c
cpp: Extend Host::call() unit test to show double free bug
2019-04-29 15:47:55 +02:00
Paweł Bylica
39162766df
Update copyright year, include the years of files creation
2019-04-24 18:36:28 +02:00
Paweł Bylica
4484a8b74a
loader: Add loading error messages
2019-04-24 15:02:56 +02:00
Paweł Bylica
51fe9f48d4
loader: Abstract and mock evmc_last_error_msg()
2019-04-24 15:02:56 +02:00
Paweł Bylica
fcc067dd73
CMake: Add unittests to CTest
2019-04-02 13:15:00 +02:00
Paweł Bylica
61542e0444
CMake: Rename evmc-test to evmc-unittests
2019-04-02 12:36:08 +02:00
Paweł Bylica
e824942149
cpp: Make HostContext to implement HostInterface
2019-04-02 11:28:21 +02:00
Paweł Bylica
1a3ca7618d
cpp: Rename host to HostContext
2019-04-02 11:28:21 +02:00
Paweł Bylica
cf24ccb2ac
test: Add basic unit tests for C++ Host wrapper
2019-03-15 11:56:55 +01:00
Paweł Bylica
4683047d0b
test: Move compile-time checks from vmtester to unittests
2019-03-15 02:32:44 +01:00
Paweł Bylica
3ef9c1de50
examples: Always build example_vm as shared library
2019-03-14 18:32:27 +01:00
Paweł Bylica
ee795276cd
test: Drop vm-mock
2019-03-13 22:07:13 +01:00
Paweł Bylica
d8f09d1d11
test: Rewrite loader unit tests by mocking DLL loading
2019-03-13 22:07:13 +01:00