Skip to content

Commit

Permalink
Fix test inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
elbrujohalcon committed Oct 25, 2024
1 parent 361bcd2 commit 2954616
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion test_app/after/src/brackets.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(brackets).

-format #{inline_items => all, paper => 50}.
-format #{inline_items => all}.
-format #{paper => 50}.

-compile(export_all).

Expand Down
3 changes: 2 additions & 1 deletion test_app/after/src/brackets_ignore.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
%% This module should not be formatted since it's in the list of ignored modules
-module(brackets_ignore).

-format(#{paper => 50, inline_items => all}).
-format(#{paper => 50}).
-format(#{inline_items => all}).

-compile(export_all).

Expand Down
3 changes: 2 additions & 1 deletion test_app/after/src/inline_items/inline_items_when_over.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
%% per line if they're larger than 5 elements.
-module(inline_items_when_over).

-format #{inline_items => {when_over, 5}, paper => 80}.
-format #{paper => 80}.
-format #{inline_items => {when_over, 5}}.

-export([short_tuple/0, short_list/0, short_fun/0]).
-export([short_bin/0, short_guard/1, short_lc/0]).
Expand Down
3 changes: 2 additions & 1 deletion test_app/after/src/inline_items/inline_items_when_under.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(inline_items_when_under).

-format #{inline_items => {when_under, 5}, paper => 80}.
-format #{paper => 80}.
-format #{inline_items => {when_under, 5}}.

-export([short_tuple/0, short_list/0, short_fun/0]).
-export([short_bin/0, short_guard/1, short_lc/0]).
Expand Down
3 changes: 2 additions & 1 deletion test_app/after/src/inline_items/inline_no_items.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
%% per line if they're large.
-module(inline_no_items).

-format #{inline_items => none, paper => 80}.
-format #{inline_items => none}.
-format #{paper => 80}.

-export([short_tuple/0, short_list/0, short_fun/0]).
-export([short_bin/0, short_guard/1, short_lc/0]).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(function_composition_spaces).

-format #{inline_qualified_function_composition => true, spaces_around_arguments => true}.
-format #{inline_qualified_function_composition => true}.
-format #{spaces_around_arguments => true}.

-export([local_calls/3, external_calls/0]).

Expand Down
3 changes: 2 additions & 1 deletion test_app/after/src/matches.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-compile(export_all).

-format #{paper => 80, ribbon => 75}.
-format #{paper => 80}.
-format #{ribbon => 75}.

matches() ->
% Short
Expand Down
3 changes: 2 additions & 1 deletion test_app/src/brackets.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(brackets).

-format(#{inline_items => all, paper => 50}).
-format(#{inline_items => all}).
-format(#{paper => 50}).

-compile(export_all).

Expand Down
3 changes: 2 additions & 1 deletion test_app/src/brackets_ignore.erl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
%% This module should not be formatted since it's in the list of ignored modules
-module(brackets_ignore).

-format(#{paper => 50, inline_items => all}).
-format(#{paper => 50}).
-format(#{inline_items => all}).

-compile(export_all).

Expand Down
4 changes: 2 additions & 2 deletions test_app/src/inline_items/inline_items_when_over.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
%% per line if they're larger than 5 elements.
-module inline_items_when_over.

-format #{paper => 80, inline_items => {when_over, 5}}.
-format #{paper => 80}.
-format #{inline_items => {when_over, 5}}.

-export [short_tuple/0, short_list/0, short_fun/0].
-export [short_bin/0, short_guard/1, short_lc/0].
Expand Down Expand Up @@ -106,4 +107,3 @@ exact() ->

long() ->
[these, items, should, be, inlined, they, are, more, than, 25, $., 'We', can, be, sure, about, that, because, we, added, a, very, long, number, 'of', items, to, this, list].

4 changes: 2 additions & 2 deletions test_app/src/inline_items/inline_items_when_under.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module inline_items_when_under.

-format #{paper => 80, inline_items => {when_under, 5}}.
-format #{paper => 80}.
-format #{inline_items => {when_under, 5}}.

-export [short_tuple/0, short_list/0, short_fun/0].
-export [short_bin/0, short_guard/1, short_lc/0].
Expand Down Expand Up @@ -103,4 +104,3 @@ exact() ->

long() ->
[these, items, should, be, inlined, they, are, more, than, 25, $., 'We', can, be, sure, about, that, because, we, added, a, very, long, number, 'of', items, to, this, list].

3 changes: 2 additions & 1 deletion test_app/src/inline_items/inline_no_items.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
%% per line if they're large.
-module inline_no_items.

-format #{inline_items => none, paper => 80}.
-format #{inline_items => none}.
-format #{paper => 80}.

-export [short_tuple/0, short_list/0, short_fun/0].
-export [short_bin/0, short_guard/1, short_lc/0].
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(function_composition_spaces).

-format #{spaces_around_arguments => true, inline_qualified_function_composition => true}.
-format #{inline_qualified_function_composition => true}.
-format #{spaces_around_arguments => true}.

-export([local_calls/3, external_calls/0]).

Expand Down
3 changes: 2 additions & 1 deletion test_app/src/matches.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-compile(export_all).

-format #{paper => 80, ribbon => 75}.
-format #{paper => 80}.
-format #{ribbon => 75}.

matches() ->
% Short
Expand Down

0 comments on commit 2954616

Please sign in to comment.