Exemplo n.º 1
0
int main (int argc, char* argv[]) {
    (void)argc;
    (void)argv;
    initializeRegisters(registers, numReg);
    testConditionalMove();
    testAddition();
    testMultiplication();
    testDivision();
    testBitwiseNAND();
    testLoadVal();
    testIO();
    //testHalt();
    //printf("Failure! Did not halt.\n");
    return 0;
}
Exemplo n.º 2
0
int testRealNumber() {
   cout << "Testing RealNumber... ClassBasics \t- "
      << (testClassBasics() ? "OKAY" : "FAILURE")
      << endl;
   cout << "Testing RealNumber... Addition \t\t- "
      << (testAddition() ? "OKAY" : "FAILURE")
      << endl;
   cout << "Testing RealNumber... Subtraction \t- "
      << (testSubtraction() ? "OKAY" : "FAILURE")
      << endl;
   cout << "Testing RealNumber... Multiplication \t- "
      << (testMultiplication() ? "OKAY" : "FAILURE")
      << endl;
   cout << "Testing RealNumber... Division \t\t- "
      << (testDivision() ? "OKAY" : "FAILURE")
      << endl;

   cout << endl;
   return 0;
}