obsidian/NullValue
Mock of Obsidian’s NullValue, the Bases value that represents null.
Classes
Section titled “Classes”| Class | Description |
|---|---|
| NullValue | Mock of Obsidian’s NullValue, the Bases value that represents null. A REAL singleton, as Obsidian’s is: NullValue.value is the only way in, and a second construction throws with Obsidian’s own message. The one call that gets through is the static initializer below, which runs while NullValue.value is still unset - exactly how Obsidian’s NullValue.value = new NullValue() passes its own guard. One consequence worth knowing before writing a test against it: because every null is the same object, Value.equals and Value.looseEquals answer from their identity check and never reach NullValue.equals. That is Obsidian’s shape too, not a shortcut here. |