-
-
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.
Added esbmc_output_type and source_code_format to the program. Along …
…with tests
- Loading branch information
1 parent
7baacba
commit 35403da
Showing
3 changed files
with
148 additions
and
43 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Author: Yiannis Charalambous | ||
|
||
from esbmc_ai.solution_generator import SolutionGenerator | ||
|
||
|
||
def test_get_code_from_solution(): | ||
assert ( | ||
SolutionGenerator.get_code_from_solution( | ||
"This is a code block:\n\n```c\naaa\n```" | ||
) | ||
== "aaa" | ||
) | ||
assert ( | ||
SolutionGenerator.get_code_from_solution( | ||
"This is a code block:\n\n```\nabc\n```" | ||
) | ||
== "abc" | ||
) | ||
assert ( | ||
SolutionGenerator.get_code_from_solution("This is a code block:```abc\n```") | ||
== "This is a code block:```abc\n```" | ||
) |