Created
June 1, 2013 15:42
-
-
Save lawrencejones/5690791 to your computer and use it in GitHub Desktop.
A simple test for our c libraries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context 'with invalid files' do | |
it 'detects size above 2^16 bytes' do | |
file = Utilities.openFile path + 'C_large' | |
size = Utilities.getSize file | |
# invalid file, should exceed limit | |
size.should_not be < 65536 | |
end | |
it 'detects nonexistant file' do | |
file = Utilities.openFile path + 'Ghost' | |
# invalid should point to it's initialized value- 0 | |
file.address.should eq(0) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment