Skip to content

Commit 93de5a2

Browse files
committed
测试
1 parent d48ec5a commit 93de5a2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Test/src/CodeFormatTest.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ bool TestFormatted(std::string input, const std::string& shouldBe, std::shared_p
1919
formatter.BuildFormattedElement();
2020

2121
auto formattedText = formatter.GetFormattedText();
22-
std::cout << StringUtil::TrimSpace(formattedText) << std::endl;
23-
std::cout << "=============" << std::endl;
24-
std::cout << StringUtil::TrimSpace(shouldBe) << std::endl;
22+
auto f1 = StringUtil::TrimSpace(formattedText);
23+
auto f2 = StringUtil::TrimSpace(shouldBe);
24+
25+
std::cout << format("size {} {}", f1.size(), f2.size()) << std::endl;
26+
std::cout << format("size {} {}", f1.size(), f2.size()) << std::endl;
27+
2528
return StringUtil::TrimSpace(formattedText) == StringUtil::TrimSpace(shouldBe);
2629
}
2730

@@ -67,7 +70,7 @@ void CollectLuaFile(std::filesystem::path directoryPath, std::vector<std::string
6770

6871
std::string ReadFile(const std::string& path)
6972
{
70-
std::fstream fin(path, std::ios::in | std::ios::binary);
73+
std::fstream fin(path, std::ios::in);
7174

7275
if (fin.is_open())
7376
{

0 commit comments

Comments
 (0)