Skip to content

Commit db07f19

Browse files
committed
Implement review
Signed-off-by: rd4com <144297616+rd4com@users.noreply.github.com>
1 parent 64783be commit db07f19

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

mojo/stdlib/test/collections/test_inline_array.mojo

+4-9
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,17 @@ fn test_unsafe_ptr() raises:
226226
assert_equal(arr[i], ptr[i])
227227

228228

229-
def test_sizeof_array[
230-
current_type: CollectionElement, capacity: Int
231-
](fill_value: current_type):
229+
def test_sizeof_array[current_type: CollectionElement, capacity: Int]():
232230
"""Testing if `sizeof` the array equals capacity * `sizeof` current_type.
233231
234-
Args:
235-
fill_value: The value to initialize the array with.
236-
237232
Parameters:
238233
current_type: The type of the elements of the `InlineList`.
239234
capacity: The capacity of the `InlineList`.
240235
"""
241236
alias size_of_current_type = sizeof[current_type]()
242-
var arr = InlineArray[current_type, capacity](fill=fill_value)
243237
assert_equal(
244-
sizeof[__type_of(arr._array)](), capacity * size_of_current_type
238+
sizeof[InlineArray[current_type, capacity]](),
239+
capacity * size_of_current_type,
245240
)
246241

247242

@@ -254,4 +249,4 @@ def main():
254249
test_array_contains()
255250
test_inline_array_runs_destructors()
256251
test_unsafe_ptr()
257-
test_sizeof_array[Int, capacity=32](fill_value=0)
252+
test_sizeof_array[Int, capacity=32]()

0 commit comments

Comments
 (0)