mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-20 12:16:30 +00:00
test(runtime-c-api) Simplify code.
This commit is contained in:
@ -7,12 +7,13 @@
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
wasmer_memory_t *memory = NULL;
|
wasmer_memory_t *memory = NULL;
|
||||||
wasmer_limits_t descriptor;
|
wasmer_limits_t descriptor = {
|
||||||
descriptor.min = 10;
|
.min = 10,
|
||||||
wasmer_limit_option_t max;
|
.max = {
|
||||||
max.has_some = true;
|
.has_some = true,
|
||||||
max.some = 15;
|
.some = 15,
|
||||||
descriptor.max = max;
|
},
|
||||||
|
};
|
||||||
wasmer_result_t memory_result = wasmer_memory_new(&memory, descriptor);
|
wasmer_result_t memory_result = wasmer_memory_new(&memory, descriptor);
|
||||||
printf("Memory result: %d\n", memory_result);
|
printf("Memory result: %d\n", memory_result);
|
||||||
assert(memory_result == WASMER_OK);
|
assert(memory_result == WASMER_OK);
|
||||||
|
Reference in New Issue
Block a user