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
@@ -329,7 +329,7 @@ The matcher will also fail when comparing a `timestamp` to a `timestamp with tim
329
329
The matcher enables detection data-type changes.
330
330
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.
331
331
332
-
To keep it simple, the `equal` will only succeed if you compare apples to apples.
332
+
To keep it simple, the `equal`matcher will only succeed if you compare apples to apples.
333
333
334
334
Example usage
335
335
```sql
@@ -406,8 +406,9 @@ create or replace package body test_animals_getter is
406
406
end;
407
407
```
408
408
409
-
**Comparing NULLs is by default!**
409
+
**Comparing NULLs is by default a success!**
410
410
The `a_nulls_are_equal` parameter controls the behavior of a `null = null` comparison.
411
+
To change the behavior of `NULL = NULL` comparison pass the `a_nulls_are_equal => false` to the `equal` matcher.
411
412
412
413
413
414
## Comparing objects, cursors, collections of data
@@ -418,9 +419,9 @@ utPLSQL is capable of comparing compound data-types including:
418
419
- nested table/varray types
419
420
420
421
### Notes on comparison of compound data
421
-
- Compound data can contain elements of any data-type. This includes blob, clob, object type, nested table, varray or nested-cursor.
422
+
- 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.
422
423
- Cursors, nested table and varray types are compared as **ordered lists of elements**. If order of elements differ, expectation will fail.
423
-
- Comparison of compound data does not currently support data-type check on attribute/column level. This might be changed in the future.
424
+
- 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.
424
425
- 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.
425
426
- To compare nested table/varray type you need to convert it to `anydata` by using `anydata.convertCollection()`
426
427
- To compare object type you need to convert it to `anydata` by using `anydata.convertObject()`
0 commit comments