2008-08-08 00:01:22 +00:00
|
|
|
#include "filter_evaluator.h"
|
2008-08-03 00:36:27 +00:00
|
|
|
#include "affunctions.h"
|
|
|
|
|
|
|
|
int main( int argc, char** argv ) {
|
2008-08-08 00:01:22 +00:00
|
|
|
filter_evaluator f;
|
2008-08-03 00:36:27 +00:00
|
|
|
|
|
|
|
bool result = false;
|
|
|
|
|
2008-08-07 13:53:18 +00:00
|
|
|
for(int i=0;i<=100;i++) {
|
2008-08-08 00:01:22 +00:00
|
|
|
try {
|
|
|
|
f.add_variable( "foo", AFPData(string("love")) );
|
|
|
|
result = f.evaluate( "specialratio('foo;') == 0.25" );
|
|
|
|
} catch (AFPException* excep) {
|
|
|
|
printf( "Exception: %s\n", excep->what() );
|
|
|
|
}
|
2008-08-03 00:36:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (result) {
|
|
|
|
printf("Success!\n");
|
|
|
|
} else {
|
|
|
|
printf("OH NOES!\n");
|
|
|
|
}
|
|
|
|
}
|