<commit_before>#include "bandit_base.h"
#include "msg.h"

go_bandit([]()
{
    describe("Msg", []()
    {
        it("formats one string arg.", []()
        {
            Msg m("Hello %s.");
            m.add("world");
            AssertThat(m.str(), Equals("Hello world."));
        });
    });
});<commit_msg>refine the test of msg<commit_after>#include "bandit_base.h"
#include "msg.h"

go_bandit([]()
{
    describe("Msg with Hello", []()
    {
        PtrT<Msg> pMsg;
        before_each([&]() {
            pMsg.reset(new Msg("Hello %s"));
        });

        it("to world", [&](){
            pMsg->add("world");
            AssertThat(pMsg->str(), Equals("Hello world."));
        });

        it("to John", [&](){
            pMsg->add("John");
            AssertThat(pMsg->str(), Equals("Hello John."));
        });
    });
});
{'fraction_non_alphanumeric': 0.22673031026252982, 'fraction_numerical': 0.0, 'mean_word_length': 1.943859649122807, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1963934', 'n_tokens_mistral': 285, 'n_tokens_neox': 285, 'n_words': 47}