diff --git a/integration_tests/test_intrinsic_function_mixed_print.py b/integration_tests/test_intrinsic_function_mixed_print.py index 5689b85f79..8c5ee2f32d 100644 --- a/integration_tests/test_intrinsic_function_mixed_print.py +++ b/integration_tests/test_intrinsic_function_mixed_print.py @@ -4,14 +4,22 @@ def test_intrinsic_function_mixed_print(): # list and list methods my_list: list[i32] = [1, 2, 3, 4, 5] print("Popped element:", my_list.pop()) + assert my_list == [1, 2, 3, 4] + print("1 is located at:", my_list.index(1)) + assert my_list.index(1) == 0 + my_list.append(2) print("2 is present", my_list.count(2), "times") + assert my_list.count(2) == 2 + print(my_list.pop(), my_list) + assert my_list == [1, 2, 3, 4] # dict and dict methods my_dict: dict[str, i32] = {"first": 1, "second": 2, "third": 3} print("Keys:", my_dict.keys()) print("Value of 'third':", my_dict.pop("third")) + assert len(my_dict.keys()) == 2 test_intrinsic_function_mixed_print() \ No newline at end of file diff --git a/tests/reference/runtime-test_intrinsic_function_mixed_print-a862825.json b/tests/reference/runtime-test_intrinsic_function_mixed_print-a862825.json index 93b5ac8972..4a4b853c8e 100644 --- a/tests/reference/runtime-test_intrinsic_function_mixed_print-a862825.json +++ b/tests/reference/runtime-test_intrinsic_function_mixed_print-a862825.json @@ -2,7 +2,7 @@ "basename": "runtime-test_intrinsic_function_mixed_print-a862825", "cmd": "lpython {infile}", "infile": "tests/../integration_tests/test_intrinsic_function_mixed_print.py", - "infile_hash": "eb30139022c49be86015547192341d98c3b05e74da74e17dc621bef3", + "infile_hash": "b0f779598e5d9868d183f1032fb3f87c131fedacf7848aaed6c4d238", "outfile": null, "outfile_hash": null, "stdout": "runtime-test_intrinsic_function_mixed_print-a862825.stdout",