Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Sep 17, 2024
1 parent e0c7d27 commit 0c92607
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
4 changes: 2 additions & 2 deletions tests/test-knuth-bendix-1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ namespace libsemigroups {
TEMPLATE_TEST_CASE("redundant_rule (word_type)",
"[014][quick][knuth-bendix]",
KNUTH_BENDIX_TYPES) {
using literals::operator""_w;
using literals:: operator""_w;
auto rg = ReportGuard(false);
Presentation<word_type> p;
p.alphabet(3);
Expand Down Expand Up @@ -681,7 +681,7 @@ namespace libsemigroups {
"[016][quick][knuth-bendix]",
KNUTH_BENDIX_TYPES) {
using literals::operator""_w;
auto rg = ReportGuard(false);
auto rg = ReportGuard(false);

Presentation<std::string> p;
p.contains_empty_word(true);
Expand Down
4 changes: 2 additions & 2 deletions tests/test-knuth-bendix-2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,7 @@ namespace libsemigroups {
TEMPLATE_TEST_CASE("Reinis MFE",
"[027][todd-coxeter][quick]",
KNUTH_BENDIX_TYPES) {
using literals::operator""_w;
using literals:: operator""_w;
Presentation<word_type> p;
p.alphabet(2);
presentation::add_rule(p, "000"_w, "11"_w);
Expand Down Expand Up @@ -1702,7 +1702,7 @@ namespace libsemigroups {
p.alphabet(2);
presentation::add_idempotent_rules_no_checks(p, 01_w);
using words::operator+;
WordRange words;
WordRange words;
words.alphabet_size(2).min(0).max(3);
size_t n = 2;
for (size_t a = 0; a < n - 1; ++a) {
Expand Down
9 changes: 5 additions & 4 deletions tests/test-knuth-bendix-5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,11 @@ namespace libsemigroups {
auto ntc = (iterator_range(pp.begin(), pp.end())
| filter([](auto const& val) { return val.size() > 1; })
| transform([](auto& val) {
std::for_each(val.begin(), val.end(), [](auto& w) -> auto& {
w.erase(w.begin());
return w;
});
std::for_each(
val.begin(), val.end(), [](auto& w) -> auto& {
w.erase(w.begin());
return w;
});
return val;
}));

Expand Down
4 changes: 2 additions & 2 deletions tests/test-presentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2637,7 +2637,7 @@ namespace libsemigroups {
"meaningful exception messages",
"[quick][presentation]") {
using literals::operator""_w;
auto rg = ReportGuard(false);
auto rg = ReportGuard(false);

{
Presentation<std::string> p;
Expand Down Expand Up @@ -2713,7 +2713,7 @@ namespace libsemigroups {
"056",
"add_generator (std::string)",
"[quick][presentation]") {
auto rg = ReportGuard(false);
auto rg = ReportGuard(false);
using literals::operator""_w;

{
Expand Down
2 changes: 1 addition & 1 deletion tests/test-to-froidure-pin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ namespace libsemigroups {
namespace {
template <typename Word, typename OtherWord = Word>
void check_from_ke(Presentation<Word> const& p) {
using literals::operator""_w;
using literals:: operator""_w;
Kambites<OtherWord> k(p);
auto s = to_froidure_pin(k);
REQUIRE(s.is_finite() == tril::FALSE);
Expand Down
2 changes: 1 addition & 1 deletion tests/test-todd-coxeter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4515,7 +4515,7 @@ namespace libsemigroups {
presentation::add_rule(p, pow({a}, 3), {a});
}
using words::operator+;
WordRange words;
WordRange words;
words.alphabet_size(n).min(0).max(8);

for (size_t a = 0; a < n - 1; ++a) {
Expand Down
16 changes: 8 additions & 8 deletions tests/test-words.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ namespace libsemigroups {
REQUIRE_THROWS_AS(words.order(Order::recursive), LibsemigroupsException);

WordRange copy;
copy.operator=(words);
copy. operator=(words);
REQUIRE(copy.get() == 00_w);
copy.next();
REQUIRE(copy.get() == 000_w);
Expand All @@ -519,7 +519,7 @@ namespace libsemigroups {
REQUIRE(copy.count() == 25);

WordRange move;
move.operator=(std::move(words));
move. operator=(std::move(words));
REQUIRE(equal(copy, move));
REQUIRE(move.upper_bound() == 28);
REQUIRE(move.first() == 0_w);
Expand Down Expand Up @@ -901,7 +901,7 @@ namespace libsemigroups {
REQUIRE_THROWS_AS(strings.order(Order::recursive), LibsemigroupsException);

StringRange copy;
copy.operator=(strings);
copy. operator=(strings);
REQUIRE(copy.get() == "aa");
copy.next();
REQUIRE(copy.get() == "aaa");
Expand All @@ -914,7 +914,7 @@ namespace libsemigroups {
REQUIRE(copy.count() == 25);

StringRange move;
move.operator=(std::move(strings));
move. operator=(std::move(strings));
REQUIRE(equal(copy, move));
REQUIRE(move.upper_bound() == 28);
REQUIRE(move.first() == "a");
Expand Down Expand Up @@ -1018,8 +1018,8 @@ namespace libsemigroups {
"[quick][word_functions]") {
using namespace literals;
using words::operator+;
word_type w = 01_w;
word_type v = 2_w;
word_type w = 01_w;
word_type v = 2_w;
REQUIRE((w + v) == 012_w);
REQUIRE((w + v + w) == 01201_w);

Expand All @@ -1037,8 +1037,8 @@ namespace libsemigroups {
"[quick][word_functions]") {
using namespace literals;
using words::operator+=;
word_type w = 123_w;
word_type v = 345_w;
word_type w = 123_w;
word_type v = 345_w;
w += v;
REQUIRE(w == 123345_w);
word_type t = word_type({});
Expand Down

0 comments on commit 0c92607

Please sign in to comment.