@@ -3532,7 +3532,6 @@ class TestBufferOverrun : public TestFixture {
35323532 }
35333533
35343534 void buffer_overrun_readSizeFromCfg () {
3535- Settings settings;
35363535 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
35373536 " <def>\n "
35383537 " <podtype name=\" u8\" sign=\" u\" size=\" 1\" />\n "
@@ -3544,7 +3543,7 @@ class TestBufferOverrun : public TestFixture {
35443543 " <arg nr=\" 2\" />\n "
35453544 " </function>\n "
35463545 " </def>" ;
3547- ASSERT ( settings. library . loadxmldata (xmldata, sizeof (xmldata)));
3546+ const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
35483547
35493548 // Attempt to get size from Cfg files, no false positives if size is not specified
35503549 check (" void f() {\n "
@@ -4085,7 +4084,6 @@ class TestBufferOverrun : public TestFixture {
40854084 // extracttests.disable
40864085
40874086 void minsize_argvalue () {
4088- Settings settings;
40894087 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
40904088 " <def>\n "
40914089 " <function name=\" mymemset\" >\n "
@@ -4097,8 +4095,7 @@ class TestBufferOverrun : public TestFixture {
40974095 " <arg nr=\" 3\" />\n "
40984096 " </function>\n "
40994097 " </def>" ;
4100- ASSERT (settings.library .loadxmldata (xmldata, sizeof (xmldata)));
4101- settings.severity .enable (Severity::warning);
4098+ Settings settings = settingsBuilder ().libraryxml (xmldata, sizeof (xmldata)).severity (Severity::warning).build ();
41024099 settings.platform .sizeof_wchar_t = 4 ;
41034100
41044101 check (" void f() {\n "
@@ -4224,7 +4221,6 @@ class TestBufferOverrun : public TestFixture {
42244221 }
42254222
42264223 void minsize_sizeof () {
4227- Settings settings;
42284224 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
42294225 " <def>\n "
42304226 " <function name=\" mystrncpy\" >\n "
@@ -4237,7 +4233,7 @@ class TestBufferOverrun : public TestFixture {
42374233 " <arg nr=\" 3\" />\n "
42384234 " </function>\n "
42394235 " </def>" ;
4240- ASSERT ( settings. library . loadxmldata (xmldata, sizeof (xmldata)));
4236+ const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
42414237
42424238 check (" void f() {\n "
42434239 " char c[7];\n "
@@ -4285,7 +4281,6 @@ class TestBufferOverrun : public TestFixture {
42854281 }
42864282
42874283 void minsize_strlen () {
4288- Settings settings;
42894284 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
42904285 " <def>\n "
42914286 " <function name=\" mysprintf\" >\n "
@@ -4299,7 +4294,7 @@ class TestBufferOverrun : public TestFixture {
42994294 " </arg>\n "
43004295 " </function>\n "
43014296 " </def>" ;
4302- ASSERT ( settings. library . loadxmldata (xmldata, sizeof (xmldata)));
4297+ const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
43034298
43044299 // formatstr..
43054300 check (" void f() {\n "
@@ -4399,7 +4394,6 @@ class TestBufferOverrun : public TestFixture {
43994394 }
44004395
44014396 void minsize_mul () {
4402- Settings settings;
44034397 const char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
44044398 " <def>\n "
44054399 " <function name=\" myfread\" >\n "
@@ -4411,7 +4405,7 @@ class TestBufferOverrun : public TestFixture {
44114405 " <arg nr=\" 4\" />\n "
44124406 " </function>\n "
44134407 " </def>" ;
4414- ASSERT ( settings. library . loadxmldata (xmldata, sizeof (xmldata)));
4408+ const Settings settings = settingsBuilder (). libraryxml (xmldata, sizeof (xmldata)). build ( );
44154409
44164410 check (" void f() {\n "
44174411 " char c[5];\n "
0 commit comments