Skip to content

Commit 6624c1e

Browse files
FelonEkonomclaude
andcommitted
Fix compilation warnings in test files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 9c81d5a commit 6624c1e

5 files changed

Lines changed: 9 additions & 10 deletions

File tree

test/membrane/core/pipeline_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ defmodule Membrane.Core.PipelineTest do
8383
end
8484

8585
test "should raise if trying to spawn element with already taken name", %{state: state} do
86-
state = %State{state | children: %{a: %{group: nil, name: :a}}}
86+
state = %{state | children: %{a: %{group: nil, name: :a}}}
8787

8888
assert_raise Membrane.ParentError, ~r/.*duplicate.*\[:a\]/i, fn ->
8989
ActionHandler.handle_action(
@@ -97,7 +97,7 @@ defmodule Membrane.Core.PipelineTest do
9797
end
9898

9999
test "notification handling", %{state: state} do
100-
state = %State{state | children: %{source: %{}}}
100+
state = %{state | children: %{source: %{}}}
101101
notification = Message.new(:child_notification, [:source, :abc])
102102
assert {:noreply, state} = @module.handle_info(notification, state)
103103
assert %{internal_state: %{child_notification: {:abc, :source}}} = state
@@ -110,7 +110,7 @@ defmodule Membrane.Core.PipelineTest do
110110
end
111111

112112
test "other messages handling", %{state: state} do
113-
state = %State{state | children: %{source: %{}}}
113+
state = %{state | children: %{source: %{}}}
114114
assert {:noreply, state} = @module.handle_info(:other_message, state)
115115
assert %{internal_state: %{other: :other_message}} = state
116116
end

test/membrane/integration/auto_demands_test.exs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ defmodule Membrane.Integration.AutoDemandsTest do
8888
Enum.flat_map(payloads, &Enum.map(1..Integer.pow(factor, filters), fn _i -> &1 end))
8989

9090
{in_payloads, out_payloads} =
91-
case direction do
92-
:up -> {payloads, mult_payloads}
93-
:down -> {mult_payloads, payloads}
94-
end
91+
if direction == :up,
92+
do: {payloads, mult_payloads},
93+
else: {mult_payloads, payloads}
9594

9695
filter = %ExponentialAutoFilter{factor: factor, direction: direction}
9796

test/membrane/integration/demands_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ defmodule Membrane.Integration.DemandsTest do
217217

218218
@impl true
219219
def handle_buffer(pad, buffer, ctx, state) do
220-
buffer = %Membrane.Buffer{buffer | metadata: pad}
220+
buffer = %{buffer | metadata: pad}
221221

222222
{pad_counter, state} = get_and_update_in(state, [:pads_counters, pad], &{&1, &1 + 1})
223223

test/membrane/integration/sync_test/ticking_pace.exs renamed to test/membrane/integration/sync_test/ticking_pace_test.exs

File renamed without changes.

test/membrane/telemetry_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,14 +215,14 @@ defmodule Membrane.TelemetryTest do
215215
from: ":filter",
216216
pad_from: ":output",
217217
pad_to: ":input",
218-
parent_component_path: _path,
218+
parent_component_path: path,
219219
to: ":sink"
220220
},
221221
%{
222222
from: ":source",
223223
pad_from: ":output",
224224
pad_to: ":input",
225-
parent_component_path: _path,
225+
parent_component_path: path,
226226
to: ":filter"
227227
}
228228
] = Enum.sort([link1.value, link2.value])

0 commit comments

Comments
 (0)