-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented SourceFile and Solution in the rest of the program
- Loading branch information
1 parent
74f164c
commit 52d03b0
Showing
4 changed files
with
133 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# Author: Yiannis Charalambous | ||
|
||
from esbmc_ai.frontend.solution import apply_line_patch | ||
from esbmc_ai.solution import SourceFile | ||
|
||
|
||
def test_apply_line_patch() -> None: | ||
text = "\n".join(["a", "b", "c", "d", "e", "f", "g"]) | ||
answer = "\n".join(["a", "b", "1", "g"]) | ||
assert apply_line_patch(text, "1", 2, 5) == answer | ||
assert SourceFile.apply_line_patch(text, "1", 2, 5) == answer | ||
|
||
text = "\n".join(["a", "b", "c", "d", "e", "f", "g"]) | ||
answer = "\n".join(["a", "b", "c", "1", "e", "f", "g"]) | ||
assert apply_line_patch(text, "1", 3, 3) == answer | ||
assert SourceFile.apply_line_patch(text, "1", 3, 3) == answer | ||
|
||
|
||
# TODO Add more tests for solution and sourcefile |