示例#1
0
 void SetUp()
 {
     RESET_FAKE(voidfunc1);
     RESET_FAKE(voidfunc2);
     RESET_FAKE(longfunc0);
     FFF_RESET_HISTORY();
 }
示例#2
0
文件: memory.cpp 项目: skarger/sos
  virtual void SetUp() {
    // Code here will be called immediately after the constructor (right
    // before each test).
    RESET_FAKE(disable_interrupts);
    RESET_FAKE(enable_interrupts);
    RESET_FAKE(getCurrentPID);
    FFF_RESET_HISTORY();

    addr = malloc(TOTAL_SPACE);
    if (addr == NULL) {
        printf("SetUp could not allocate memory\n");
        exit(1);
    }
    test_mmr = configure_memory(addr, TOTAL_SPACE);
  }
示例#3
0
文件: io_fs.cpp 项目: skarger/sos
  virtual void SetUp() {
    // Code here will be called immediately after the constructor (right
    // before each test).
    FFF_RESET_HISTORY();

    RESET_FAKE(initialize_io_touch_pad);
    RESET_FAKE(fgetc_touch_pad);
    RESET_FAKE(fputc_touch_pad);

    RESET_FAKE(initialize_io_adc);
    RESET_FAKE(fgetc_potentiometer);
    RESET_FAKE(fputc_potentiometer);
    RESET_FAKE(fgetc_thermistor);
    RESET_FAKE(fputc_thermistor);

    RESET_FAKE(initialize_io_lcd);
    RESET_FAKE(fgetc_lcd);
    RESET_FAKE(fputc_lcd);

    RESET_FAKE(initialize_io_uart);
    RESET_FAKE(fgetc_uart);
    RESET_FAKE(fputc_uart);
    RESET_FAKE(fflush_uart);

    RESET_FAKE(initialize_io_button);
    RESET_FAKE(fgetc_button);
    RESET_FAKE(fputc_button);

    RESET_FAKE(initialize_io_led);
    RESET_FAKE(fgetc_led);
    RESET_FAKE(fputc_led);

    RESET_FAKE(disable_interrupts);
    RESET_FAKE(enable_interrupts);
    RESET_FAKE(getCurrentPID);

    test_stream = &ts;
  }
示例#4
0
文件: io.cpp 项目: skarger/sos
  virtual void SetUp() {
    // Code here will be called immediately after the constructor (right
    // before each test).
    RESET_FAKE(ledOrangeOn);
    RESET_FAKE(ledOrangeOff);
    RESET_FAKE(pushbuttonInitAll);
    RESET_FAKE(sw1In);
    RESET_FAKE(sw2In);

    RESET_FAKE(initialize_io_touch_pad);
    RESET_FAKE(fgetc_touch_pad);
    RESET_FAKE(fputc_touch_pad);

    RESET_FAKE(initialize_io_adc);
    RESET_FAKE(fgetc_potentiometer);
    RESET_FAKE(fputc_potentiometer);
    RESET_FAKE(fgetc_thermistor);
    RESET_FAKE(fputc_thermistor);

    RESET_FAKE(initialize_io_lcd);
    RESET_FAKE(fgetc_lcd);
    RESET_FAKE(fputc_lcd);

    RESET_FAKE(initialize_io_uart);
    RESET_FAKE(fgetc_uart);
    RESET_FAKE(fputc_uart);
    RESET_FAKE(fflush_uart);

    RESET_FAKE(initialize_io_button);
    RESET_FAKE(fgetc_button);
    RESET_FAKE(fputc_button);

    RESET_FAKE(initialize_io_led);
    RESET_FAKE(fgetc_led);
    RESET_FAKE(fputc_led);

    RESET_FAKE(find_file);
    RESET_FAKE(setup_stream_fs);

    RESET_FAKE(initialize_io_fs);
    RESET_FAKE(create_fs);
    RESET_FAKE(delete_fs);
    RESET_FAKE(fgetc_fs);
    RESET_FAKE(fputc_fs);

    RESET_FAKE(disable_interrupts);
    RESET_FAKE(enable_interrupts);
    RESET_FAKE(getCurrentPID);

    FFF_RESET_HISTORY();

    test_stream = &ts;
  }