MCPcopy Create free account
hub / github.com/WinMerge/winmerge / TEST_F

Function TEST_F

Testing/GoogleTest/StringDiffs/stringdiffs_test_bugs.cpp:61–77  ·  view source on GitHub ↗

Sf.net bug #1685466 - char level diff (ENUMRESLANGPROC) added to middle

Source from the content-addressed store, hash-verified

59 // Sf.net bug #1685466 - char level diff
60 // (ENUMRESLANGPROC) added to middle
61 TEST_F(StringDiffsBugsTest, Bug_1685466_1)
62 {
63 std::vector<strdiff::wdiff> diffs = strdiff::ComputeWordDiffs(
64 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
65 _T("if (EnumResourceLanguages(hinstLang, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), (ENUMRESLANGPROC)FindNextResLang, (LPARAM)&wLangID) == 0)"),
66 _T("if (EnumResourceLanguages(hinstLang, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), FindNextResLang, (LPARAM)&wLangID) == 0)"),
67 false, strdiff::EOL_STRICT, 0, false, 1, true);
68 EXPECT_EQ(1, diffs.size());
69 if (diffs.size() > 0)
70 {
71 strdiff::wdiff *pDiff = &diffs[0];
72 EXPECT_EQ(83, pDiff->begin[0]);
73 EXPECT_EQ(83, pDiff->begin[1]);
74 EXPECT_EQ(99, pDiff->end[0]);
75 EXPECT_EQ(82, pDiff->end[1]);
76 }
77 }
78
79 // Sf.net bug #1685466 - word level diff
80 // (ENUMRESLANGPROC) added to middle

Callers

nothing calls this directly

Calls 3

ComputeWordDiffsFunction · 0.85
SetBreakCharsFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected