Skip to content

Commit ce598c6

Browse files
committed
run formatter
1 parent 9a1ccb4 commit ce598c6

File tree

3 files changed

+31
-26
lines changed

3 files changed

+31
-26
lines changed

test/scenic/scene_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ defmodule Scenic.SceneTest do
2121

2222
setup do
2323
{:ok, tables} = Tables.start_link(nil)
24+
2425
on_exit(fn ->
2526
Process.exit(tables, :normal)
2627
Process.sleep(2)
2728
end)
29+
2830
%{tables: tables}
2931
end
3032

test/scenic/view_port/input_test.exs

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ defmodule Scenic.ViewPort.InputTest do
2828

2929
setup do
3030
{:ok, tables} = Tables.start_link(nil)
31+
3132
on_exit(fn ->
3233
Process.exit(tables, :normal)
3334
Process.sleep(2)
@@ -64,12 +65,13 @@ defmodule Scenic.ViewPort.InputTest do
6465
Process.sleep(10)
6566

6667
# build a capture context for the nested graph
67-
tx = Matrix.build_translation({1,1})
68+
tx = Matrix.build_translation({1, 1})
6869
inv = Matrix.invert(tx)
70+
6971
context = %Context{
7072
graph_key: graph_key1,
7173
tx: tx,
72-
inverse_tx: inv,
74+
inverse_tx: inv
7375
}
7476

7577
%{
@@ -491,9 +493,12 @@ defmodule Scenic.ViewPort.InputTest do
491493
assert context.uid == nil
492494
end
493495

494-
test "captured cursor_button", %{graph_key: graph_key,
496+
test "captured cursor_button", %{
497+
graph_key: graph_key,
495498
graph_key1: graph_key1,
496-
context: context, master_graph_key: master_graph_key} do
499+
context: context,
500+
master_graph_key: master_graph_key
501+
} do
497502
# start NOT over a primitive
498503
{:noreply, _} =
499504
Input.handle_cast(
@@ -505,9 +510,11 @@ defmodule Scenic.ViewPort.InputTest do
505510
max_depth: 10
506511
}
507512
)
513+
508514
assert_received(
509515
{:"$gen_cast", {:input, {:cursor_button, {:left, :press, 0, {0.0, 0.0}}}, context}}
510516
)
517+
511518
assert context.graph_key == graph_key1
512519
assert context.id == nil
513520
assert context.uid == nil
@@ -527,14 +534,18 @@ defmodule Scenic.ViewPort.InputTest do
527534
assert_received(
528535
{:"$gen_cast", {:input, {:cursor_button, {:left, :press, 0, {49.0, 49.0}}}, context}}
529536
)
537+
530538
assert context.graph_key == graph_key1
531539
assert context.id == :circle
532540
assert context.uid == 1
533541
end
534542

535-
test "captured cursor_scroll", %{graph_key: graph_key,
543+
test "captured cursor_scroll", %{
544+
graph_key: graph_key,
536545
graph_key1: graph_key1,
537-
context: context, master_graph_key: master_graph_key} do
546+
context: context,
547+
master_graph_key: master_graph_key
548+
} do
538549
# start NOT over a primitive
539550
{:noreply, _} =
540551
Input.handle_cast(
@@ -570,9 +581,11 @@ defmodule Scenic.ViewPort.InputTest do
570581
assert context.uid == 1
571582
end
572583

573-
test "captured viewport_enter", %{graph_key: graph_key,
584+
test "captured viewport_enter", %{
585+
graph_key: graph_key,
574586
graph_key1: graph_key1,
575-
context: context} do
587+
context: context
588+
} do
576589
# start NOT over a primitive
577590
{:noreply, _} =
578591
Input.handle_cast(
@@ -587,9 +600,7 @@ defmodule Scenic.ViewPort.InputTest do
587600
assert context.graph_key == graph_key1
588601
end
589602

590-
test "captured viewport_exit", %{graph_key: graph_key,
591-
graph_key1: graph_key1,
592-
context: context} do
603+
test "captured viewport_exit", %{graph_key: graph_key, graph_key1: graph_key1, context: context} do
593604
# start NOT over a primitive
594605
{:noreply, _} =
595606
Input.handle_cast(
@@ -604,9 +615,7 @@ defmodule Scenic.ViewPort.InputTest do
604615
assert context.graph_key == graph_key1
605616
end
606617

607-
test "captured other", %{graph_key: graph_key,
608-
graph_key1: graph_key1,
609-
context: context} do
618+
test "captured other", %{graph_key: graph_key, graph_key1: graph_key1, context: context} do
610619
# start NOT over a primitive
611620
{:noreply, _} =
612621
Input.handle_cast(
@@ -640,9 +649,7 @@ defmodule Scenic.ViewPort.InputTest do
640649
}
641650
)
642651

643-
assert_received(
644-
{:"$gen_cast", {:input, {:cursor_pos, {0.0, 0.0}}, context}}
645-
)
652+
assert_received({:"$gen_cast", {:input, {:cursor_pos, {0.0, 0.0}}, context}})
646653
assert context.graph_key == graph_key1
647654
assert context.id == nil
648655
assert context.uid == nil
@@ -667,9 +674,7 @@ defmodule Scenic.ViewPort.InputTest do
667674
}
668675
)
669676

670-
assert_received(
671-
{:"$gen_cast", {:input, {:cursor_pos, {24.0, 24.0}}, context}}
672-
)
677+
assert_received({:"$gen_cast", {:input, {:cursor_pos, {24.0, 24.0}}, context}})
673678
assert context.graph_key == graph_key1
674679
assert context.id == nil
675680
assert context.uid == nil
@@ -694,9 +699,7 @@ defmodule Scenic.ViewPort.InputTest do
694699
}
695700
)
696701

697-
assert_received(
698-
{:"$gen_cast", {:input, {:cursor_pos, {49.0, 49.0}}, context}}
699-
)
702+
assert_received({:"$gen_cast", {:input, {:cursor_pos, {49.0, 49.0}}, context}})
700703
refute_received({:"$gen_cast", {:input, {:cursor_exit, _}, _}})
701704
assert_received({:"$gen_cast", {:input, {:cursor_enter, 1}, _}})
702705

@@ -724,9 +727,7 @@ defmodule Scenic.ViewPort.InputTest do
724727
}
725728
)
726729

727-
assert_received(
728-
{:"$gen_cast", {:input, {:cursor_pos, {1.0, 1.0}}, context}}
729-
)
730+
assert_received({:"$gen_cast", {:input, {:cursor_pos, {1.0, 1.0}}, context}})
730731
assert_received({:"$gen_cast", {:input, {:cursor_exit, 1}, _}})
731732
refute_received({:"$gen_cast", {:input, {:cursor_enter, _}, _}})
732733
end

test/scenic/view_port_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,12 @@ defmodule Scenic.ViewPortTest do
5252

5353
setup do
5454
{:ok, tables} = Tables.start_link(nil)
55+
5556
on_exit(fn ->
5657
Process.exit(tables, :normal)
5758
Process.sleep(2)
5859
end)
60+
5961
%{tables: tables}
6062
end
6163

0 commit comments

Comments
 (0)