Skip to content

Commit 2110b84

Browse files
committed
chore(tests): formatting
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
1 parent f2f1188 commit 2110b84

1 file changed

Lines changed: 26 additions & 17 deletions

File tree

tests/system/context.c

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ void test_ocre_context_create_container_bad_ids(void)
6161
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", ".", false, NULL));
6262
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "..", false, NULL));
6363
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "/", false, NULL));
64-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "/somewhere", false, NULL));
65-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "some/where", false, NULL));
64+
TEST_ASSERT_NULL(
65+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "/somewhere", false, NULL));
66+
TEST_ASSERT_NULL(
67+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "some/where", false, NULL));
6668
TEST_ASSERT_NULL(ocre_context_create_container(context, ".", "wamr/wasip1", NULL, false, NULL));
6769
TEST_ASSERT_NULL(ocre_context_create_container(context, "..", "wamr/wasip1", NULL, false, NULL));
6870
TEST_ASSERT_NULL(ocre_context_create_container(context, "/", "wamr/wasip1", NULL, false, NULL));
@@ -83,31 +85,38 @@ void test_ocre_context_create_container_bad_mounts(void)
8385

8486
bad_mounts.mounts = (const char *[]){"no-colon", NULL};
8587

86-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
88+
TEST_ASSERT_NULL(
89+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
8790

8891
bad_mounts.mounts = (const char *[]){"no_abs_path:/hello", NULL};
8992

90-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
93+
TEST_ASSERT_NULL(
94+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
9195

9296
bad_mounts.mounts = (const char *[]){"/tmp:/", NULL};
9397

94-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
98+
TEST_ASSERT_NULL(
99+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
95100

96101
bad_mounts.mounts = (const char *[]){"/tmp:no_abs", NULL};
97102

98-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
103+
TEST_ASSERT_NULL(
104+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
99105

100106
bad_mounts.mounts = (const char *[]){"/tmp:", NULL};
101107

102-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
108+
TEST_ASSERT_NULL(
109+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
103110

104111
bad_mounts.mounts = (const char *[]){"/tmp", NULL};
105112

106-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
113+
TEST_ASSERT_NULL(
114+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
107115

108116
bad_mounts.mounts = (const char *[]){"/tmp:/ok", "bad", NULL};
109117

110-
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
118+
TEST_ASSERT_NULL(
119+
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", NULL, false, &bad_mounts));
111120
}
112121

113122
void test_ocre_context_remove_bad_container(void)
@@ -162,8 +171,8 @@ void test_ocre_context_create_container_with_id_ok(void)
162171
{
163172
/* Create a valid container */
164173

165-
struct ocre_container *container =
166-
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "test-container", false, NULL);
174+
struct ocre_container *container = ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1",
175+
"test-container", false, NULL);
167176
TEST_ASSERT_NOT_NULL(container);
168177

169178
/* Check container status */
@@ -209,14 +218,14 @@ void test_ocre_context_create_container_with_id_twice(void)
209218
{
210219
/* Create a valid container */
211220

212-
struct ocre_container *container =
213-
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "test-container", false, NULL);
221+
struct ocre_container *container = ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1",
222+
"test-container", false, NULL);
214223
TEST_ASSERT_NOT_NULL(container);
215224

216225
/* Another container with the same id should fail */
217226

218-
TEST_ASSERT_NULL(
219-
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "test-container", false, NULL));
227+
TEST_ASSERT_NULL(ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "test-container",
228+
false, NULL));
220229

221230
/* Remove the container */
222231

@@ -227,8 +236,8 @@ void test_ocre_context_create_container_and_forget(void)
227236
{
228237
/* Create a valid container */
229238

230-
struct ocre_container *container =
231-
ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1", "should-not-leak", false, NULL);
239+
struct ocre_container *container = ocre_context_create_container(context, "hello-world.wasm", "wamr/wasip1",
240+
"should-not-leak", false, NULL);
232241
TEST_ASSERT_NOT_NULL(container);
233242

234243
/* Check container status */

0 commit comments

Comments
 (0)