The system using the libraries should exercise those libraries sufficiently that integration tests catch those kinds of errors.
If you are allowed only one test, it should be an integration test that runs in under XX seconds so you can maintain flow and correctness.
If a system is under constant churn, test at the interface boundaries, unit tests are further burden during refactoring.
Unit tests ensure that the internals function in a certain manner, external users should be concerned with internals. Unit tests are extremely useful in the core of a system like an evaluator, a rules engine, timezone, geospatial, computational geometry, etc. Your type system should capture many of the invariants in your system.
I know what you are trying to convey, but the example `add(2,2)` encourages conversational confusion. If you are verifying hardware, that is a perfectly valid test, for a high level codebase, it is most likely a worthless test.
If you are allowed only one test, it should be an integration test that runs in under XX seconds so you can maintain flow and correctness.
If a system is under constant churn, test at the interface boundaries, unit tests are further burden during refactoring.
Unit tests ensure that the internals function in a certain manner, external users should be concerned with internals. Unit tests are extremely useful in the core of a system like an evaluator, a rules engine, timezone, geospatial, computational geometry, etc. Your type system should capture many of the invariants in your system.
I know what you are trying to convey, but the example `add(2,2)` encourages conversational confusion. If you are verifying hardware, that is a perfectly valid test, for a high level codebase, it is most likely a worthless test.