diff options
author | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2019-11-11 17:55:52 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <vn.mcsinyx@gmail.com> | 2019-11-11 17:55:52 +0700 |
commit | b38d9929f7a015b56b847fde7e83f814f354497e (patch) | |
tree | def6101df9623550d2d826831504ef93c54b0297 /cpptour/Vector-test.cc | |
parent | cacc165173d67fa110766a555afe3020967d220c (diff) | |
download | cp-b38d9929f7a015b56b847fde7e83f814f354497e.tar.gz |
One does not simply do CP well in NNN
Diffstat (limited to 'cpptour/Vector-test.cc')
-rw-r--r-- | cpptour/Vector-test.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cpptour/Vector-test.cc b/cpptour/Vector-test.cc index b49ff85..fbdf129 100644 --- a/cpptour/Vector-test.cc +++ b/cpptour/Vector-test.cc @@ -1,3 +1,4 @@ +#include <cassert> #include <iostream> #include <stdexcept> @@ -13,8 +14,16 @@ neg_length () catch (bad_alloc) { cout << "BIG OOF!" << endl; } } +void +init () +{ + Vector v {7.4, 3.2, 5.2, 6.9, 9.5, 4.2, 21.7}; + assert(v[5] == 4.2); +} + int main () { neg_length (); + init (); } |