-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Ensure smoke test doctests are valid doctests * Test that integer formats are kept * Reorganize formatter tests * Fix smoke test results * Format * Make integer test elixir-version agnostic
- Loading branch information
1 parent
26b491a
commit 7915b2b
Showing
17 changed files
with
312 additions
and
284 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[*.diff] | ||
trim_trailing_whitespace=false |
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
Empty file.
5 changes: 0 additions & 5 deletions
5
smoke_test_data/elixir-1-13/project_with_formatted_code/expected_diff.ex
This file was deleted.
Oops, something went wrong.
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
54 changes: 54 additions & 0 deletions
54
smoke_test_data/elixir-1-13/project_with_unformatted_code/expected_diff.diff
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,54 @@ | ||
diff --git a/smoke_test_data/elixir-1-13/project_with_unformatted_code/lib/project_with_unformatted_code.ex b/smoke_test_data/elixir-1-13/project_with_unformatted_code/lib/project_with_unformatted_code.ex | ||
index 5b65e4d..98f817c 100644 | ||
--- a/smoke_test_data/elixir-1-13/project_with_unformatted_code/lib/project_with_unformatted_code.ex | ||
+++ b/smoke_test_data/elixir-1-13/project_with_unformatted_code/lib/project_with_unformatted_code.ex | ||
@@ -2,7 +2,7 @@ defmodule ProjectWithUnformattedCode do | ||
@moduledoc """ | ||
Documentation for `ProjectWithUnformattedCode`. | ||
|
||
- iex> ProjectWithUnformattedCode.add(5,5) | ||
+ iex> ProjectWithUnformattedCode.add(5, 5) | ||
10 | ||
""" | ||
|
||
@@ -15,7 +15,7 @@ defmodule ProjectWithUnformattedCode do | ||
3 | ||
|
||
iex> 1 | ||
- ...> |> ProjectWithUnformattedCode.add(2) | ||
+ ...> |> ProjectWithUnformattedCode.add(2) | ||
3 | ||
|
||
""" | ||
@@ -24,12 +24,28 @@ defmodule ProjectWithUnformattedCode do | ||
end | ||
|
||
@doc """ | ||
- iex> ProjectWithUnformattedCode.subtract( 5, 4 ) | ||
+ iex> ProjectWithUnformattedCode.subtract(5, 4) | ||
1 | ||
|
||
- iex> [100_000_000_000, 200_000_000_000, 300_000_000_000, 400_000_000_000, 500_000_000_000, 600_000_000_000, 700_000_000_000] | ||
+ iex> [ | ||
+ ...> 100_000_000_000, | ||
+ ...> 200_000_000_000, | ||
+ ...> 300_000_000_000, | ||
+ ...> 400_000_000_000, | ||
+ ...> 500_000_000_000, | ||
+ ...> 600_000_000_000, | ||
+ ...> 700_000_000_000 | ||
+ ...> ] | ||
...> |> Enum.map(&ProjectWithUnformattedCode.subtract(&1, 100_000_000_000)) | ||
- [0, 100_000_000_000, 200_000_000_000, 300_000_000_000, 400_000_000_000, 500_000_000_000, 600_000_000_000] | ||
+ [ | ||
+ 0, | ||
+ 100_000_000_000, | ||
+ 200_000_000_000, | ||
+ 300_000_000_000, | ||
+ 400_000_000_000, | ||
+ 500_000_000_000, | ||
+ 600_000_000_000 | ||
+ ] | ||
""" | ||
def subtract(a, b) do | ||
a - b |
62 changes: 0 additions & 62 deletions
62
smoke_test_data/elixir-1-13/project_with_unformatted_code/expected_diff.ex
This file was deleted.
Oops, something went wrong.
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
4 changes: 0 additions & 4 deletions
4
...ata/elixir-1-13/project_with_unformatted_code/test/project_with_unformatted_code_test.exs
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,8 +1,4 @@ | ||
defmodule ProjectWithUnformattedCodeTest do | ||
use ExUnit.Case | ||
doctest ProjectWithUnformattedCode | ||
|
||
test "greets the world" do | ||
assert ProjectWithUnformattedCode.hello() == :world | ||
end | ||
end |
Empty file.
This file was deleted.
Oops, something went wrong.
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
54 changes: 54 additions & 0 deletions
54
smoke_test_data/project_with_unformatted_code/expected_diff.diff
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,54 @@ | ||
diff --git a/smoke_test_data/project_with_unformatted_code/lib/project_with_unformatted_code.ex b/smoke_test_data/project_with_unformatted_code/lib/project_with_unformatted_code.ex | ||
index 5b65e4d..98f817c 100644 | ||
--- a/smoke_test_data/project_with_unformatted_code/lib/project_with_unformatted_code.ex | ||
+++ b/smoke_test_data/project_with_unformatted_code/lib/project_with_unformatted_code.ex | ||
@@ -2,7 +2,7 @@ defmodule ProjectWithUnformattedCode do | ||
@moduledoc """ | ||
Documentation for `ProjectWithUnformattedCode`. | ||
|
||
- iex> ProjectWithUnformattedCode.add(5,5) | ||
+ iex> ProjectWithUnformattedCode.add(5, 5) | ||
10 | ||
""" | ||
|
||
@@ -15,7 +15,7 @@ defmodule ProjectWithUnformattedCode do | ||
3 | ||
|
||
iex> 1 | ||
- ...> |> ProjectWithUnformattedCode.add(2) | ||
+ ...> |> ProjectWithUnformattedCode.add(2) | ||
3 | ||
|
||
""" | ||
@@ -24,12 +24,28 @@ defmodule ProjectWithUnformattedCode do | ||
end | ||
|
||
@doc """ | ||
- iex> ProjectWithUnformattedCode.subtract( 5, 4 ) | ||
+ iex> ProjectWithUnformattedCode.subtract(5, 4) | ||
1 | ||
|
||
- iex> [100_000_000_000, 200_000_000_000, 300_000_000_000, 400_000_000_000, 500_000_000_000, 600_000_000_000, 700_000_000_000] | ||
+ iex> [ | ||
+ ...> 100_000_000_000, | ||
+ ...> 200_000_000_000, | ||
+ ...> 300_000_000_000, | ||
+ ...> 400_000_000_000, | ||
+ ...> 500_000_000_000, | ||
+ ...> 600_000_000_000, | ||
+ ...> 700_000_000_000 | ||
+ ...> ] | ||
...> |> Enum.map(&ProjectWithUnformattedCode.subtract(&1, 100_000_000_000)) | ||
- [0, 100_000_000_000, 200_000_000_000, 300_000_000_000, 400_000_000_000, 500_000_000_000, 600_000_000_000] | ||
+ [ | ||
+ 0, | ||
+ 100_000_000_000, | ||
+ 200_000_000_000, | ||
+ 300_000_000_000, | ||
+ 400_000_000_000, | ||
+ 500_000_000_000, | ||
+ 600_000_000_000 | ||
+ ] | ||
""" | ||
def subtract(a, b) do | ||
a - b |
62 changes: 0 additions & 62 deletions
62
smoke_test_data/project_with_unformatted_code/expected_diff.ex
This file was deleted.
Oops, something went wrong.
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
4 changes: 0 additions & 4 deletions
4
smoke_test_data/project_with_unformatted_code/test/project_with_unformatted_code_test.exs
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,8 +1,4 @@ | ||
defmodule ProjectWithUnformattedCodeTest do | ||
use ExUnit.Case | ||
doctest ProjectWithUnformattedCode | ||
|
||
test "greets the world" do | ||
assert ProjectWithUnformattedCode.hello() == :world | ||
end | ||
end |
Oops, something went wrong.