test/src/runtime/wasm_memory_test.cpp
TEST_F(MemoryHeapTest, DeallocateExisingMemoryChunk) {
  const size_t size1 = 3;

  auto ptr1 = memory_.allocate(size1);

  auto opt_deallocated_size = memory_.deallocate(ptr1);
  ASSERT_TRUE(opt_deallocated_size.has_value());
  ASSERT_EQ(*opt_deallocated_size, size1);
}
/**
 * @given memory with allocated memory chunk
 * @when this memory is deallocated
 * @then the size of this memory chunk is returned
 */
@given memory with allocated memory chunk
@when this memory is deallocated
@then the size of this memory chunk is returned
@given memory with allocated memory chunk @when this memory is deallocated @then the size of this memory chunk is returned
TEST_F(MemoryHeapTest, DeallocateExisingMemoryChunk) {
  const size_t size1 = 3;
  auto ptr1 = memory_.allocate(size1);
  auto opt_deallocated_size = memory_.deallocate(ptr1);
  ASSERT_TRUE(opt_deallocated_size.has_value());
  ASSERT_EQ(*opt_deallocated_size, size1);
}
TEST_F ( MemoryHeapTest , DeallocateExisingMemoryChunk ) { const size_t size1 = 3 ; auto ptr1 = memory_ . allocate ( size1 ) ; auto opt_deallocated_size = memory_ . deallocate ( ptr1 ) ; ASSERT_TRUE ( opt_deallocated_size . has_value ( ) ) ; ASSERT_EQ ( * opt_deallocated_size , size1 ) ; }
@given memory with allocated memory chunk
 @when this memory is deallocated
 @then the size of this memory chunk is returned
@given memory with allocated memory chunk @when this memory is deallocated @then the size of this memory chunk is returned