-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from jxxcarlson/function-body
Oops: forgot to commit code
- Loading branch information
Showing
2 changed files
with
135 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
module Install.FunctionBodyTest exposing (..) | ||
|
||
import Install.ClauseInCase | ||
import Install.FunctionBody | ||
import Run | ||
import Test exposing (Test, describe) | ||
|
||
|
||
all : Test | ||
all = | ||
describe "Install.ClauseInCase" | ||
[ Run.testFix test1 | ||
] | ||
|
||
|
||
|
||
-- TEST 1 | ||
|
||
|
||
test1 = | ||
{ description = "Test 1, replace function body of of Frontend.view" | ||
, src = src1 | ||
, rule = rule1 | ||
, under = under1 | ||
, fixed = fixed1 | ||
, message = "Replace function \"view\"" | ||
} | ||
|
||
|
||
rule1 = | ||
Install.FunctionBody.init | ||
"Frontend" | ||
"view" | ||
"""view model = | ||
Html.text "This is a test\"""" | ||
|> Install.FunctionBody.makeRule | ||
src1 = | ||
"""module Frontend exposing(..) | ||
|
||
view model = | ||
Html.div [] [ Html.text "Hello, World!" ]""" | ||
under1b = | ||
"""module Frontend exposing(..) | ||
|
||
""" | ||
under1 = | ||
"""view model = | ||
Html.div [] [ Html.text "Hello, World!" ]""" | ||
fixed1 = | ||
"""module Frontend exposing(..) | ||
|
||
view model = | ||
Html.text "This is a test\"""" |