Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PENGUINLIONG committed Dec 21, 2022
1 parent 162dde0 commit 876acb5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions c_api/tests/c_api_behavior_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,9 @@ TEST_F(CapiTest, TestBehaviorFreeMemory) {

// runtime is null and allocate_info is valid
{
TiMemoryAllocateInfo allocate_info{};
allocate_info.size = 1024;
allocate_info.usage = TI_MEMORY_USAGE_STORAGE_BIT;
TiMemory memory = ti_allocate_memory(runtime, &allocate_info);
TiMemory memory = runtime.allocate_memory(1024);
ti_free_memory(TI_NULL_HANDLE, memory);
EXPECT_TAICHI_ERROR(TI_ERROR_ARGUMENT_NULL);
ti_free_memory(runtime, memory);
}

// runtime is not null and allocate_info is null
Expand Down Expand Up @@ -334,7 +330,6 @@ TEST_F(CapiTest, TestBehaviorFreeImage) {
TiImage image = runtime.allocate_image(make_image_allocate_info());
ti_free_image(TI_NULL_HANDLE, image);
EXPECT_TAICHI_ERROR(TI_ERROR_ARGUMENT_NULL);
ti_free_image(runtime, image);
}

// Runtime is valid, image is null
Expand Down

0 comments on commit 876acb5

Please sign in to comment.