mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-25 22:45:32 +00:00
ff2465007f
- move AFP stuff into its own namespace - move utf8 and equivset into seperate modules - parser should understand /* */ comments
24 lines
452 B
C++
24 lines
452 B
C++
#include "filter_evaluator.h"
|
|
#include "affunctions.h"
|
|
|
|
int main( int argc, char** argv ) {
|
|
afp::filter_evaluator f;
|
|
|
|
bool result = false;
|
|
|
|
for(int i=0;i<=100;i++) {
|
|
try {
|
|
f.add_variable("foo", afp::datum("love"));
|
|
result = f.evaluate( "specialratio('foo;') == 0.25" );
|
|
} catch (afp::exception* excep) {
|
|
printf( "Exception: %s\n", excep->what() );
|
|
}
|
|
}
|
|
|
|
if (result) {
|
|
printf("Success!\n");
|
|
} else {
|
|
printf("OH NOES!\n");
|
|
}
|
|
}
|