sourcehook/test/main.cpp
changeset 100 022428df37c9
parent 99 bfbb04d6683f
child 111 aec58c99dafc
     1.1 --- a/sourcehook/test/main.cpp	Sun Sep 11 23:24:18 2005 +0000
     1.2 +++ b/sourcehook/test/main.cpp	Tue Sep 13 16:47:42 2005 +0000
     1.3 @@ -6,6 +6,9 @@
     1.4  #include <iostream>
     1.5  #include <string>
     1.6  #include <list>
     1.7 +#include <stdlib.h>
     1.8 +#include <time.h>
     1.9 +#include "sh_tinyhash.h"
    1.10  #include "sourcehook_impl.h"
    1.11  
    1.12  using namespace std;
    1.13 @@ -67,6 +70,24 @@
    1.14  DO_TEST(PlugSys);
    1.15  DO_TEST(Bail);
    1.16  
    1.17 +template <>
    1.18 +int SourceHook::HashFunction<int>(const int & k)
    1.19 +{
    1.20 +	return k;
    1.21 +}
    1.22 +
    1.23 +template <>
    1.24 +int SourceHook::Compare<int>(const int & v1, const int & v2)
    1.25 +{
    1.26 +	if (v1 == v2)
    1.27 +		return 0;
    1.28 +	if (v1 < v2)
    1.29 +		return -1;
    1.30 +	if (v1 > v2)
    1.31 +		return 1;
    1.32 +	return 0;
    1.33 +}
    1.34 +
    1.35  int main(int argc, char *argv[])
    1.36  {
    1.37  	std::string error;