wordfor

vac·u·ous·ly true

/ˈvæk.ju.əs.li ˌtruː/ (VAK-yoo-us-lee troo) adjective

Logic & reasoning

  1. A claim about every member of a group that is true only because the group is empty. 'All my tests pass' is vacuously true when the test suite is empty.

Origin

From Latin vacuus, 'empty'. A term of mathematical logic.

In practice

[].every(ok) is true. Guard 'all passed' checks against empty collections, and fail a test run that ran zero tests.

Say to your AI

Check for vacuous truth: if the list is empty, return an explicit 'nothing to check' result instead of treating it as a pass.

In plain words

  • true because there was nothing to check
  • every item passed but there were no items
  • an empty list counts as all good
  • all tests passed but zero tests ran

See also edge case necessary vs. sufficient condition

Find similar words