MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / test_SaveLoad

Method test_SaveLoad

tests/INIFile_test.cpp:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 }
39
40 void test_SaveLoad()
41 {
42 QString a = "a";
43 QString b = "a\nb\t\n\\\\\\C:\\Program files\\terrible\\name\\of something\\#thisIsNotAComment";
44 QString filename = "test_SaveLoad.ini";
45
46 // save
47 INIFile f;
48 f.set("a", a);
49 f.set("b", b);
50 f.saveFile(filename);
51
52 // load
53 INIFile f2;
54 f2.loadFile(filename);
55 QCOMPARE(a, f2.get("a","NOT SET").toString());
56 QCOMPARE(b, f2.get("b","NOT SET").toString());
57 }
58};
59
60QTEST_GUILESS_MAIN(IniFileTest)

Callers

nothing calls this directly

Calls 5

saveFileMethod · 0.80
loadFileMethod · 0.80
setMethod · 0.45
toStringMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected