Literals
Literals are constant values defined within the program rather than provided by a party.
Integer
Integer
represents a literal integer value. This value can be a negative integer, a positive integer, or zero.
- Nada program
- Test file
src/addition_literal.py
loading...
tests/addition_literal_test.yaml
loading...
Run and test the addition_literal program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run addition_literal_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test addition_literal_test
UnsignedInteger
UnsignedInteger
represents a literal unsigned integer value. This value can be zero or a positive integer.
- Nada program
- Test file
src/addition_literal_unsigned.py
loading...
tests/addition_literal_unsigned_test.yaml
loading...
Run and test the addition_literal_unsigned program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run addition_literal_unsigned_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test addition_literal_unsigned_test
Boolean
Boolean
represents a literal boolean value defined within the program rather than provided by a party. This value can be true or false.
- Nada program
- Test file
src/literal_boolean.py
loading...
tests/literal_boolean_test.yaml
loading...
Run and test the literal_boolean program
1. Open "Nada by Example"
2. Run the program with inputs
from the test file
nada run literal_boolean_test
3. Test the program with inputs
from the test file against the expected_outputs
from the test file
nada test literal_boolean_test