--- nono/vm/test_tool.h 2026/04/29 17:04:53 1.1 +++ nono/vm/test_tool.h 2026/04/29 17:05:43 1.1.1.3 @@ -35,7 +35,7 @@ class autotemp { public: - autotemp(const std::string& name) { + explicit autotemp(const std::string& name) { strcpy(tempname, "/tmp/sayakatest.XXXXXX"); cdirname = mkdtemp(tempname); filename = std::string(cdirname) + "/" + name; @@ -67,7 +67,7 @@ extern int test_fail; // C++ では xp_eq(exp, act) と xp_eq(exp, act, msg) のように 2つか3つの // ようなのを受け取るのが難しい。ただ、どうせここを雑にしといても関数定義に // マッチしなければエラーになるので、気にしないことにする。 -#define xp_eq(...) xp_eq_(__FILE__, __LINE__, __func__, __VA_ARGS__) +#define xp_eq(...) xp_eq_(__FILE__, __LINE__, __func__, __VA_ARGS__) extern void xp_eq_(const char *file, int line, const char *func, int exp, int act, const std::string& msg = "");