Skip to content

Commit

Permalink
Adjusted test suite to take into account recent bug fixes and improve…
Browse files Browse the repository at this point in the history
…ments.
  • Loading branch information
anthony-tuininga committed Aug 31, 2020
1 parent 7da33ca commit 3a6a8d2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
6 changes: 3 additions & 3 deletions doc/src/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ODPI-C Release notes
====================

Version 4.0.2 (TBD)
-------------------
Version 4.0.2 (August 31, 2020)
-------------------------------

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


Version 4.0.1 (June 26, 2020)
Expand Down
6 changes: 4 additions & 2 deletions test/TestConnProperties.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,9 @@ int dpiTest_407_withValidEncoding(dpiTestCase *testCase, dpiTestParams *params)
return dpiTestCase_setFailedFromError(testCase);

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

// get connection with just the nencoding specified
commonParams.encoding = NULL;
if (dpiContext_initCommonCreateParams(context, &commonParams) < 0)
return dpiTestCase_setFailedFromError(testCase);
commonParams.nencoding = charSet;
if (dpiConn_create(context, params->mainUserName,
params->mainUserNameLength, params->mainPassword,
Expand Down
12 changes: 10 additions & 2 deletions test/TestDataTypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,10 @@ int dpiTest_1206_verifyNumDataTypeWithDiffValues(dpiTestCase *testCase,
"0",
"92999999999999999999999999999999999999",
"-92999999999999999999999999999999999999",
"999999999999999999999999999999999999999",
"-999999999999999999999999999999999999999",
"9999999999999999999999999999999999999999",
"-9999999999999999999999999999999999999999",
"900000000000000000000000000000000000000000000000000000000000000000000"
"000000000000000000000000000000000000000000000000000000000",
"-90000000000000000000000000000000000000000000000000000000000000000000"
Expand All @@ -1367,6 +1371,10 @@ int dpiTest_1206_verifyNumDataTypeWithDiffValues(dpiTestCase *testCase,
"0",
"92999999999999999999999999999999999999",
"-92999999999999999999999999999999999999",
"999999999999999999999999999999999999999",
"-999999999999999999999999999999999999999",
"9999999999999999999999999999999999999999",
"-9999999999999999999999999999999999999999",
"9E+125",
"-9E+125",
"3.0123456789012345678901234567890123456",
Expand Down Expand Up @@ -1453,8 +1461,8 @@ int dpiTest_1207_verifyInvalidValues(dpiTestCase *testCase,
"-1E+126",
"1E-131",
"-1E-131",
"999999999999999999999999999999999999999",
"-999999999999999999999999999999999999999",
"99999999999999999999999999999999999999999",
"-99999999999999999999999999999999999999999",
"www.json.org",
"1.2.3",
"a",
Expand Down
6 changes: 4 additions & 2 deletions test/TestPoolProperties.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,9 @@ int dpiTest_606_encodingInfo(dpiTestCase *testCase, dpiTestParams *params)
return dpiTestCase_setFailedFromError(testCase);

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

// create pool with just the nencoding specified
commonParams.encoding = NULL;
if (dpiContext_initCommonCreateParams(context, &commonParams) < 0)
return dpiTestCase_setFailedFromError(testCase);
commonParams.nencoding = charSet;
if (dpiPool_create(context, params->mainUserName,
params->mainUserNameLength, params->mainPassword,
Expand Down
6 changes: 4 additions & 2 deletions test/TestSodaColl.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,8 @@ int dpiTest_2609_verifyFind(dpiTestCase *testCase, dpiTestParams *params)
//-----------------------------------------------------------------------------
int dpiTest_2610_testInvalidJson(dpiTestCase *testCase, dpiTestParams *params)
{
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", NULL };
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", "ORA-40780:",
NULL };
const char *content = "{\"test : 2610 content\"}";
const char *collName = "ODPIC_COLL_2610";
dpiSodaColl *coll;
Expand Down Expand Up @@ -1153,7 +1154,8 @@ int dpiTest_2614_verifyInsertManyWorksAsExpected(dpiTestCase *testCase,
int dpiTest_2615_testInsertManyWithInvalidJson(dpiTestCase *testCase,
dpiTestParams *params)
{
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", NULL };
const char *expectedErrors[] = { "ORA-02290:", "ORA-40479:", "ORA-40780:",
NULL };
const char *contents[5] = {
"{\"test1\" : \"2615 content1\"}",
"{\"test2\" : \"2615 content2\"}",
Expand Down

0 comments on commit 3a6a8d2

Please sign in to comment.