|
| 1 | +from regression.LVSA.lvsa_driver import LvsaDriver |
| 2 | + |
| 3 | + |
| 4 | +folder_name = 'TestPreciseAccessPaths' |
| 5 | + |
| 6 | + |
| 7 | +def test_field_setter(tmpdir): |
| 8 | + # This test should change when precise access paths have been implemented |
| 9 | + lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('field_setter') |
| 10 | + lvsa_expectation = lvsa_driver.run() |
| 11 | + |
| 12 | + output_value_expectation = lvsa_expectation.check_output() |
| 13 | + |
| 14 | + output_value_expectation.check_number_of_values(1) |
| 15 | + output_value_expectation.check_contains_external_value_set() |
| 16 | + |
| 17 | + |
| 18 | +def test_field_getter(tmpdir): |
| 19 | + # This test should change when precise access paths have been implemented |
| 20 | + lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('field_getter') |
| 21 | + lvsa_expectation = lvsa_driver.run() |
| 22 | + |
| 23 | + output_value_expectation = lvsa_expectation.check_return_value() |
| 24 | + |
| 25 | + output_value_expectation.check_number_of_values(1) |
| 26 | + output_value_expectation.check_contains_external_value_set() |
| 27 | + |
| 28 | + |
| 29 | +def test_read_field_before_writing_to_aliasable_field(tmpdir): |
| 30 | + # This test should change when precise access paths have been implemented |
| 31 | + lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('read_field_before_writing_to_aliasable_field') |
| 32 | + lvsa_expectation = lvsa_driver.run() |
| 33 | + |
| 34 | + output_value_expectation_1 = lvsa_expectation.check_external_value_set('A', '.left_object') |
| 35 | + |
| 36 | + output_value_expectation_1.check_number_of_values(2) |
| 37 | + output_value_expectation_1.check_contains_external_value_set() |
| 38 | + output_value_expectation_1.check_contains_dynamic_object() |
| 39 | + |
| 40 | + output_value_expectation_2 = lvsa_expectation.check_output() |
| 41 | + |
| 42 | + output_value_expectation_2.check_number_of_values(1) |
| 43 | + output_value_expectation_2.check_contains_external_value_set() |
| 44 | + |
| 45 | + |
| 46 | +def test_read_field_after_writing_to_aliasable_field(tmpdir): |
| 47 | + # This test should not change significantly when precise access paths have been implemented |
| 48 | + lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('read_field_after_writing_to_aliasable_field') |
| 49 | + lvsa_expectation = lvsa_driver.run() |
| 50 | + |
| 51 | + output_value_expectation_1 = lvsa_expectation.check_external_value_set('A', '.left_object') |
| 52 | + |
| 53 | + output_value_expectation_1.check_number_of_values(2) |
| 54 | + output_value_expectation_1.check_contains_external_value_set() |
| 55 | + output_value_expectation_1.check_contains_dynamic_object() |
| 56 | + |
| 57 | + output_value_expectation_2 = lvsa_expectation.check_output() |
| 58 | + |
| 59 | + output_value_expectation_2.check_number_of_values(2) |
| 60 | + output_value_expectation_2.check_contains_external_value_set() |
| 61 | + output_value_expectation_2.check_contains_dynamic_object() |
| 62 | + |
| 63 | + |
| 64 | +def test_call_function_to_allocate_new_object(tmpdir): |
| 65 | + # This test should change when precise access paths have been implemented |
| 66 | + lvsa_driver = LvsaDriver(tmpdir, folder_name).with_test_function('call_function_to_allocate_new_object') |
| 67 | + lvsa_expectation = lvsa_driver.run() |
| 68 | + |
| 69 | + output_value_expectation = lvsa_expectation.check_output() |
| 70 | + |
| 71 | + output_value_expectation.check_number_of_values(2) |
| 72 | + output_value_expectation.check_contains_external_value_set() |
| 73 | + output_value_expectation.check_contains_dynamic_object() |
0 commit comments