From a33eb18ec36a07f2784578ec932200d0e5933f25 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 30 May 2015 02:57:35 +0100 Subject: [PATCH] initial example vector tests --- tests/vector.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/vector.cpp b/tests/vector.cpp index 001e2d1..e0da425 100644 --- a/tests/vector.cpp +++ b/tests/vector.cpp @@ -1,5 +1,24 @@ +#include #include "octa/vector.h" +using namespace octa; + int main() { + Vector x = { 5, 10, 15, 20 }; + + assert(x.first() == 5); + assert(x.last() == 20); + + assert(x[0] == 5); + assert(x[2] == 15); + + assert(x.size() == 4); + + Vector y(5, 10); + + assert(y.size() == 5); + assert(y.first() == 10); + assert(y.last() == 10); + return 0; } \ No newline at end of file