checkstrings.cpp

Go to the documentation of this file.
00001 // To use, remove the binary, then "make checkstrings"
00002 // Could say "all is well" when not, if some operators are deleted and the
00003 // same number added
00004 
00005 #include <stdio.h>
00006 #include <string.h>
00007 #include "operstrings.h"
00008 #include "../include/operator.h"
00009 
00010 int main() {
00011     if (sizeof(operStrings)/sizeof(char*) == opNumOf) {
00012         printf("All is correct\n");
00013         return 0;
00014     }
00015     if ((strcmp(operStrings[opFPlusd],  "opFPlusd") != 0)) {
00016         printf("Error before opFPlusd\n"); return 1; }
00017     if ((strcmp(operStrings[opSQRTq],   "opSQRTq") != 0)) {
00018         printf("Error before opSQRTq\n"); return 1;}
00019     if ((strcmp(operStrings[opGtrEqUns],    "opGtrEqUns") != 0)) {
00020         printf("Error before opGtrEqUns\n"); return 1;}
00021     if ((strcmp(operStrings[opTargetInst],  "opTargetInst") != 0)) {
00022         printf("Error before opTargetInst\n"); return 1;}
00023     if ((strcmp(operStrings[opList],    "opList") != 0)) {
00024         printf("Error before opList\n"); return 1;}
00025     if ((strcmp(operStrings[opMachFtr], "opMachFtr") != 0)) {
00026         printf("Error before opMachFtr\n"); return 1;}
00027     if ((strcmp(operStrings[opFpop],    "opFpop") != 0)) {
00028         printf("Error before opFpop\n"); return 1;}
00029     if ((strcmp(operStrings[opExecute], "opExecute") != 0)) {
00030         printf("Error before opExecute\n"); return 1;}
00031     if ((strcmp(operStrings[opWildStrConst],    "opWildStrConst") != 0)) {
00032         printf("Error before opWildStrConst\n"); return 1;}
00033     if ((strcmp(operStrings[opAnull],   "opAnull") != 0)) {
00034         printf("Error before opAnull\n"); return 1;}
00035     printf("Error near the end\n");
00036     return 1;
00037 }

Generated on Tue Sep 19 21:18:15 2006 for Boomerang by  doxygen 1.4.6