Missing semantics
Enhex opened this issue · 3 comments
The function names don't have any semantic value - it's impossible to know what they mean from the name.
describe(description)
describe what?
should be:
setup(description)
it(description)
it ...what???
should be:
test(description)
before_each()
each what?
should be:
before_test()
go_bandit()
where does the bandit go to?
I assume you like this sort of naming style, so my suggestion is adding aliases for the functions with proper semantics so other people could use it.
describe("your mom", [] {
it("is fatter than butter", [&] {
// tests
});
});
It's one of the 2 popular testing "patterns", you write it like sentences.
Also, you're yelling "GO, BANDIT!!!" mid-battle, not politely telling it "Bandit, could you please go to XYZ?".
As pointed out earlier, this is a pretty standard naming convention (except for the go_bandit part). It's nothing I've come up with on my own.