|
1 | 1 | import sys |
2 | 2 |
|
3 | | -from codeflash.verification.codeflash_capture import codeflash_capture |
4 | | - |
5 | 3 |
|
6 | 4 | class BubbleSorter: |
7 | | - |
8 | | - @codeflash_capture(function_name='BubbleSorter.__init__', tmp_dir_path='/var/folders/mg/k_c0twcj37q_gph3cfy3zlt80000gn/T/codeflash_ec8xrcji/test_return_values', tests_root='/Users/krrt7/Desktop/work/cf_org/codeflash/code_to_optimize/tests/pytest', is_fto=True) |
9 | 5 | def __init__(self, x=0): |
10 | 6 | self.x = x |
11 | 7 |
|
12 | 8 | def sorter(self, arr): |
13 | | - print('codeflash stdout : BubbleSorter.sorter() called') |
| 9 | + print("codeflash stdout : BubbleSorter.sorter() called") |
14 | 10 | for i in range(len(arr)): |
15 | 11 | for j in range(len(arr) - 1): |
16 | 12 | if arr[j] > arr[j + 1]: |
17 | 13 | temp = arr[j] |
18 | 14 | arr[j] = arr[j + 1] |
19 | 15 | arr[j + 1] = temp |
20 | | - print('stderr test', file=sys.stderr) |
| 16 | + print("stderr test", file=sys.stderr) |
21 | 17 | return arr |
22 | 18 |
|
23 | 19 | @classmethod |
24 | 20 | def sorter_classmethod(cls, arr): |
25 | | - print('codeflash stdout : BubbleSorter.sorter_classmethod() called') |
| 21 | + print("codeflash stdout : BubbleSorter.sorter_classmethod() called") |
26 | 22 | for i in range(len(arr)): |
27 | 23 | for j in range(len(arr) - 1): |
28 | 24 | if arr[j] > arr[j + 1]: |
29 | 25 | temp = arr[j] |
30 | 26 | arr[j] = arr[j + 1] |
31 | 27 | arr[j + 1] = temp |
32 | | - print('stderr test classmethod', file=sys.stderr) |
| 28 | + print("stderr test classmethod", file=sys.stderr) |
33 | 29 | return arr |
34 | 30 |
|
35 | 31 | @staticmethod |
36 | 32 | def sorter_staticmethod(arr): |
37 | | - print('codeflash stdout : BubbleSorter.sorter_staticmethod() called') |
| 33 | + print("codeflash stdout : BubbleSorter.sorter_staticmethod() called") |
38 | 34 | for i in range(len(arr)): |
39 | 35 | for j in range(len(arr) - 1): |
40 | 36 | if arr[j] > arr[j + 1]: |
41 | 37 | temp = arr[j] |
42 | 38 | arr[j] = arr[j + 1] |
43 | 39 | arr[j + 1] = temp |
44 | | - print('stderr test staticmethod', file=sys.stderr) |
| 40 | + print("stderr test staticmethod", file=sys.stderr) |
45 | 41 | return arr |
0 commit comments