Remove tests for no longer existing code
parent
12f3198f68
commit
6fada6acf8
@ -1 +0,0 @@
|
||||
*_test
|
@ -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
|
@ -1,6 +0,0 @@
|
||||
hello, len=5
|
||||
001
|
||||
hell, len=4
|
||||
010
|
||||
01
|
||||
4 3
|
@ -1,28 +0,0 @@
|
||||
#include <iostream>
|
||||
|
||||
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;
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
#include <cassert>
|
||||
|
||||
#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;
|
||||
}
|
@ -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
|
Loading…
Reference in New Issue