Commit db07f19 1 parent 64783be commit db07f19 Copy full SHA for db07f19
File tree 1 file changed +4
-9
lines changed
mojo/stdlib/test/collections
1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -226,22 +226,17 @@ fn test_unsafe_ptr() raises:
226
226
assert_equal(arr[i], ptr[i])
227
227
228
228
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]():
232
230
""" Testing if `sizeof` the array equals capacity * `sizeof` current_type.
233
231
234
- Args:
235
- fill_value: The value to initialize the array with.
236
-
237
232
Parameters:
238
233
current_type: The type of the elements of the `InlineList`.
239
234
capacity: The capacity of the `InlineList`.
240
235
"""
241
236
alias size_of_current_type = sizeof[current_type]()
242
- var arr = InlineArray[current_type, capacity](fill = fill_value)
243
237
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,
245
240
)
246
241
247
242
@@ -254,4 +249,4 @@ def main():
254
249
test_array_contains()
255
250
test_inline_array_runs_destructors()
256
251
test_unsafe_ptr()
257
- test_sizeof_array[Int, capacity=32 ](fill_value = 0 )
252
+ test_sizeof_array[Int, capacity=32 ]()
You can’t perform that action at this time.
0 commit comments