Skip to content

Commit 3a6a8d2

Browse files
Adjusted test suite to take into account recent bug fixes and improvements.
1 parent 7da33ca commit 3a6a8d2

File tree

5 files changed

+25
-11
lines changed

5 files changed

+25
-11
lines changed

doc/src/releasenotes.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
ODPI-C Release notes
22
====================
33

4-
Version 4.0.2 (TBD)
5-
-------------------
4+
Version 4.0.2 (August 31, 2020)
5+
-------------------------------
66

77
#) Adjusted check for GNU version of strerror_r() on Cygwin as suggested
88
(`issue 138 <https://github.com/oracle/odpi/issues/138>`__).
@@ -11,7 +11,7 @@ Version 4.0.2 (TBD)
1111
<https://github.com/oracle/python-cx_Oracle/issues/459>`__).
1212
#) Correct double free error
1313
(`issue 141 <https://github.com/oracle/odpi/issues/141>`__).
14-
#) Improved documentation.
14+
#) Improved documentation and adjusted test suite.
1515

1616

1717
Version 4.0.1 (June 26, 2020)

test/TestConnProperties.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,9 @@ int dpiTest_407_withValidEncoding(dpiTestCase *testCase, dpiTestParams *params)
270270
return dpiTestCase_setFailedFromError(testCase);
271271

272272
// get connection with just the encoding specified
273+
if (dpiContext_initCommonCreateParams(context, &commonParams) < 0)
274+
return dpiTestCase_setFailedFromError(testCase);
273275
commonParams.encoding = charSet;
274-
commonParams.nencoding = NULL;
275276
if (dpiConn_create(context, params->mainUserName,
276277
params->mainUserNameLength, params->mainPassword,
277278
params->mainPasswordLength, params->connectString,
@@ -290,7 +291,8 @@ int dpiTest_407_withValidEncoding(dpiTestCase *testCase, dpiTestParams *params)
290291
return dpiTestCase_setFailedFromError(testCase);
291292

292293
// get connection with just the nencoding specified
293-
commonParams.encoding = NULL;
294+
if (dpiContext_initCommonCreateParams(context, &commonParams) < 0)
295+
return dpiTestCase_setFailedFromError(testCase);
294296
commonParams.nencoding = charSet;
295297
if (dpiConn_create(context, params->mainUserName,
296298
params->mainUserNameLength, params->mainPassword,

test/TestDataTypes.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1350,6 +1350,10 @@ int dpiTest_1206_verifyNumDataTypeWithDiffValues(dpiTestCase *testCase,
13501350
"0",
13511351
"92999999999999999999999999999999999999",
13521352
"-92999999999999999999999999999999999999",
1353+
"999999999999999999999999999999999999999",
1354+
"-999999999999999999999999999999999999999",
1355+
"9999999999999999999999999999999999999999",
1356+
"-9999999999999999999999999999999999999999",
13531357
"900000000000000000000000000000000000000000000000000000000000000000000"
13541358
"000000000000000000000000000000000000000000000000000000000",
13551359
"-90000000000000000000000000000000000000000000000000000000000000000000"
@@ -1367,6 +1371,10 @@ int dpiTest_1206_verifyNumDataTypeWithDiffValues(dpiTestCase *testCase,
13671371
"0",
13681372
"92999999999999999999999999999999999999",
13691373
"-92999999999999999999999999999999999999",
1374+
"999999999999999999999999999999999999999",
1375+
"-999999999999999999999999999999999999999",
1376+
"9999999999999999999999999999999999999999",
1377+
"-9999999999999999999999999999999999999999",
13701378
"9E+125",
13711379
"-9E+125",
13721380
"3.0123456789012345678901234567890123456",
@@ -1453,8 +1461,8 @@ int dpiTest_1207_verifyInvalidValues(dpiTestCase *testCase,
14531461
"-1E+126",
14541462
"1E-131",
14551463
"-1E-131",
1456-
"999999999999999999999999999999999999999",
1457-
"-999999999999999999999999999999999999999",
1464+
"99999999999999999999999999999999999999999",
1465+
"-99999999999999999999999999999999999999999",
14581466
"www.json.org",
14591467
"1.2.3",
14601468
"a",

test/TestPoolProperties.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ int dpiTest_606_encodingInfo(dpiTestCase *testCase, dpiTestParams *params)
280280
return dpiTestCase_setFailedFromError(testCase);
281281

282282
// create pool with just the encoding specified
283+
if (dpiContext_initCommonCreateParams(context, &commonParams) < 0)
284+
return dpiTestCase_setFailedFromError(testCase);
283285
commonParams.encoding = charSet;
284-
commonParams.nencoding = NULL;
285286
if (dpiPool_create(context, params->mainUserName,
286287
params->mainUserNameLength, params->mainPassword,
287288
params->mainPasswordLength, params->connectString,
@@ -300,7 +301,8 @@ int dpiTest_606_encodingInfo(dpiTestCase *testCase, dpiTestParams *params)
300301
return dpiTestCase_setFailedFromError(testCase);
301302

302303
// create pool with just the nencoding specified
303-
commonParams.encoding = NULL;
304+
if (dpiContext_initCommonCreateParams(context, &commonParams) < 0)
305+
return dpiTestCase_setFailedFromError(testCase);
304306
commonParams.nencoding = charSet;
305307
if (dpiPool_create(context, params->mainUserName,
306308
params->mainUserNameLength, params->mainPassword,

test/TestSodaColl.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,8 @@ int dpiTest_2609_verifyFind(dpiTestCase *testCase, dpiTestParams *params)
768768
//-----------------------------------------------------------------------------
769769
int dpiTest_2610_testInvalidJson(dpiTestCase *testCase, dpiTestParams *params)
770770
{
771-
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", NULL };
771+
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", "ORA-40780:",
772+
NULL };
772773
const char *content = "{\"test : 2610 content\"}";
773774
const char *collName = "ODPIC_COLL_2610";
774775
dpiSodaColl *coll;
@@ -1153,7 +1154,8 @@ int dpiTest_2614_verifyInsertManyWorksAsExpected(dpiTestCase *testCase,
11531154
int dpiTest_2615_testInsertManyWithInvalidJson(dpiTestCase *testCase,
11541155
dpiTestParams *params)
11551156
{
1156-
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", NULL };
1157+
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", "ORA-40780:",
1158+
NULL };
11571159
const char *contents[5] = {
11581160
"{\"test1\" : \"2615 content1\"}",
11591161
"{\"test2\" : \"2615 content2\"}",

0 commit comments

Comments
 (0)