Skip to content

Commit

Permalink
Simplify channel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Nov 28, 2023
1 parent 54ccbb0 commit 7e243be
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions libmamba/tests/src/specs/test_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,10 @@ TEST_SUITE("specs::channel")
CHECK_EQ(chan_b, chan_a);
CHECK_EQ(chan_a, chan_b);

chan_b = chan_a;
chan_b.set_platforms({ "linux-64", "noarch" });
chan_b = Channel(chan_a.url(), chan_a.display_name(), { "linux-64", "noarch" });
CHECK_NE(chan_b, chan_a);

chan_b = chan_a;
chan_b.set_display_name("othername");
chan_b = Channel(chan_a.url(), "othername", chan_a.platforms());
CHECK_NE(chan_b, chan_a);
}
}
Expand Down Expand Up @@ -111,12 +109,12 @@ TEST_SUITE("specs::channel")
CHECK(chan_a.contains_equivalent(chan_b));
CHECK(chan_b.contains_equivalent(chan_a));

chan_a.set_platforms({ "noarch", "linux-64" });
chan_a = Channel(chan_a.url(), chan_a.display_name(), { "noarch", "linux-64" });
CHECK(chan_a.contains_equivalent(chan_a));
CHECK(chan_a.contains_equivalent(chan_b));
CHECK_FALSE(chan_b.contains_equivalent(chan_a));

chan_b.set_platforms({ "osx-64" });
chan_b = Channel(chan_b.url(), chan_b.display_name(), { "ox-64" });
CHECK_FALSE(chan_a.contains_equivalent(chan_b));
CHECK_FALSE(chan_b.contains_equivalent(chan_a));
}
Expand Down

0 comments on commit 7e243be

Please sign in to comment.