You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -338,7 +338,7 @@ The matcher will also fail when comparing a `timestamp` to a `timestamp with tim
338
338
The matcher enables detection data-type changes.
339
339
If you expect your variable to be a number and it is now some other type, the test will fail and give you early indication of a potential problem.
340
340
341
-
To keep it simple, the `equal` will only succeed if you compare apples to apples.
341
+
To keep it simple, the `equal`matcher will only succeed if you compare apples to apples.
342
342
343
343
Example usage
344
344
```sql
@@ -415,8 +415,9 @@ create or replace package body test_animals_getter is
415
415
end;
416
416
```
417
417
418
-
**Comparing NULLs is by default!**
418
+
**Comparing NULLs is by default a success!**
419
419
The `a_nulls_are_equal` parameter controls the behavior of a `null = null` comparison.
420
+
To change the behavior of `NULL = NULL` comparison pass the `a_nulls_are_equal => false` to the `equal` matcher.
420
421
421
422
422
423
## Comparing objects, cursors, collections of data
@@ -427,9 +428,9 @@ utPLSQL is capable of comparing compound data-types including:
427
428
- nested table/varray types
428
429
429
430
### Notes on comparison of compound data
430
-
- Compound data can contain elements of any data-type. This includes blob, clob, object type, nested table, varray or nested-cursor.
431
+
- Compound data can contain elements of any data-type. This includes blob, clob, object type, nested table, varray or even a nested-cursor within a cursor.
431
432
- Cursors, nested table and varray types are compared as **ordered lists of elements**. If order of elements differ, expectation will fail.
432
-
- Comparison of compound data does not currently support data-type check on attribute/column level. This might be changed in the future.
433
+
- Comparison of compound data is data-type aware. So a column `ID NUMBER` in a cursor is not the same as `ID VARCHAR2(100)`, even if they both hold the same numeric values.
433
434
- Comparison of cursor columns containing `DATE` will only compare date part **and ignore time** by default. See [Comparing cursor data containing DATE fields](#comparing-cursor-data-containing-date-fields) to check how to enable date-time comparison in cursors.
434
435
- To compare nested table/varray type you need to convert it to `anydata` by using `anydata.convertCollection()`
435
436
- To compare object type you need to convert it to `anydata` by using `anydata.convertObject()`
0 commit comments