#!/bin/bash


#Quickly compile and run test program
#--
echo "#include <stxxl.h> 
int main() { 
	stxxl::vector<int> v; 
	v.resize(10,1); 
	int sum=0; 
	for(size_t ui=0;ui<10; ui++) 
		sum+=v[ui]; 
	if (sum == 10*10/2)
		return 0;
	else
		return 1;
}" >  test_program.cpp

#Compile.
g++ test_program.cpp -o test_program -lstxxl

if [ $? -ne 0 ] ; then
	exit 1;
fi

#run program
./test_program
if [ $? -ne 0 ] ; then
	exit 2;
fi


#--


