From 6fada6acf896b4e68bc487e2500c5b53af4be856 Mon Sep 17 00:00:00 2001 From: scrawl Date: Thu, 23 Apr 2015 20:02:18 +0200 Subject: [PATCH] Remove tests for no longer existing code --- components/misc/tests/.gitignore | 1 - components/misc/tests/Makefile | 12 ----- components/misc/tests/output/slice_test.out | 6 --- components/misc/tests/output/strops_test.out | 0 components/misc/tests/slice_test.cpp | 28 ------------ components/misc/tests/strops_test.cpp | 48 -------------------- components/misc/tests/test.sh | 18 -------- 7 files changed, 113 deletions(-) delete mode 100644 components/misc/tests/.gitignore delete mode 100644 components/misc/tests/Makefile delete mode 100644 components/misc/tests/output/slice_test.out delete mode 100644 components/misc/tests/output/strops_test.out delete mode 100644 components/misc/tests/slice_test.cpp delete mode 100644 components/misc/tests/strops_test.cpp delete mode 100755 components/misc/tests/test.sh diff --git a/components/misc/tests/.gitignore b/components/misc/tests/.gitignore deleted file mode 100644 index 814490404..000000000 --- a/components/misc/tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*_test diff --git a/components/misc/tests/Makefile b/components/misc/tests/Makefile deleted file mode 100644 index dc1ded5ff..000000000 --- a/components/misc/tests/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -GCC=g++ - -all: strops_test slice_test - -slice_test: slice_test.cpp ../slice_array.hpp - $(GCC) $< -o $@ - -strops_test: strops_test.cpp ../stringops.hpp ../stringops.cpp - $(GCC) $< -o $@ ../stringops.cpp - -clean: - rm *_test diff --git a/components/misc/tests/output/slice_test.out b/components/misc/tests/output/slice_test.out deleted file mode 100644 index 7b054082b..000000000 --- a/components/misc/tests/output/slice_test.out +++ /dev/null @@ -1,6 +0,0 @@ -hello, len=5 -001 -hell, len=4 -010 -01 -4 3 diff --git a/components/misc/tests/output/strops_test.out b/components/misc/tests/output/strops_test.out deleted file mode 100644 index e69de29bb..000000000 diff --git a/components/misc/tests/slice_test.cpp b/components/misc/tests/slice_test.cpp deleted file mode 100644 index 0d9d7b4ab..000000000 --- a/components/misc/tests/slice_test.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include - -using namespace std; - -#include "../slice_array.hpp" - -int main() -{ - Misc::SString s, t; - s = Misc::SString("hello"); - cout << s.toString() << ", len=" << s.length << endl; - cout << (s=="hel") << (s=="hell") << (s=="hello") << endl; - t = s; - - s = Misc::SString("othello"+2, 4); - cout << s.toString() << ", len=" << s.length << endl; - cout << (s=="hel") << (s=="hell") << (s=="hello") << endl; - - cout << (s==t) << (Misc::SString("hello")==t) << endl; - - const int arr[4] = {1,2,3,4}; - - Misc::IntArray ia(arr,4); - - cout << ia.length << " " << ia.ptr[2] << endl; - - return 0; -} diff --git a/components/misc/tests/strops_test.cpp b/components/misc/tests/strops_test.cpp deleted file mode 100644 index 24ab8a298..000000000 --- a/components/misc/tests/strops_test.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include - -#include "../stringops.hpp" - -int main() -{ - assert(Misc::begins("abc", "a")); - assert(Misc::begins("abc", "ab")); - assert(Misc::begins("abc", "abc")); - assert(Misc::begins("abcd", "abc")); - - assert(!Misc::begins("abc", "b")); - assert(!Misc::begins("abc", "bc")); - assert(!Misc::begins("abc", "bcd")); - assert(!Misc::begins("abc", "abcd")); - - assert(Misc::ibegins("Abc", "a")); - assert(Misc::ibegins("aBc", "ab")); - assert(Misc::ibegins("abC", "abc")); - assert(Misc::ibegins("abcD", "abc")); - - assert(!Misc::ibegins("abc", "b")); - assert(!Misc::ibegins("abc", "bc")); - assert(!Misc::ibegins("abc", "bcd")); - assert(!Misc::ibegins("abc", "abcd")); - - assert(Misc::ends("abc", "c")); - assert(Misc::ends("abc", "bc")); - assert(Misc::ends("abc", "abc")); - assert(Misc::ends("abcd", "abcd")); - - assert(!Misc::ends("abc", "b")); - assert(!Misc::ends("abc", "ab")); - assert(!Misc::ends("abc", "bcd")); - assert(!Misc::ends("abc", "abcd")); - - assert(Misc::iends("Abc", "c")); - assert(Misc::iends("aBc", "bc")); - assert(Misc::iends("abC", "abc")); - assert(Misc::iends("abcD", "abcd")); - - assert(!Misc::iends("abc", "b")); - assert(!Misc::iends("abc", "ab")); - assert(!Misc::iends("abc", "bcd")); - assert(!Misc::iends("abc", "abcd")); - - return 0; -} diff --git a/components/misc/tests/test.sh b/components/misc/tests/test.sh deleted file mode 100755 index 2d07708ad..000000000 --- a/components/misc/tests/test.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -make || exit - -mkdir -p output - -PROGS=*_test - -for a in $PROGS; do - if [ -f "output/$a.out" ]; then - echo "Running $a:" - ./$a | diff output/$a.out - - else - echo "Creating $a.out" - ./$a > "output/$a.out" - git add "output/$a.out" - fi -done