Lecture 4
This makes a good test suite when you are searching for an element in a list
Empty list
Single element list
Element not there
Element there
Multiple element lists
First position
Last position
Middle position
There
Not there
Too low (off at lower end)
Too high (off at higher end)
The tests you will design for your program will differ but this list should provide a guide!
Discussed Dos commands for
changing drive
showing directories only
changing to a directory
seeing just executable files..
Using re-direction to take input from a text file and have the program’s output go to a file
Done from the command line
Get to the command line using START RUN CMD
Must use an executable file
If using redirection all input comes from the input file and all output goes to the output file.
Looked at how to modify binary_search_test.adb
Only tricky part was indicating that the list_type and binary_search came from bin_search
Then we looked at how to handle files
Reminders of things
discussed in the past
n
n reserved words
n the ability to input and output enumerated type values
directly
n named parameters
n := as the assignment
operator
n -- on a line indicates
the start of a comment and no code can follow the comment
n => is
called an “arrow” and we saw its use in named parameter passing
n ‘ is called a tick – all discrete types have
attributes such as ‘first and ‘last