Esempio n. 1
0
static void
adc_thread(cyg_addrword_t data)
{
    cyg_io_handle_t channel;
    cyg_devtab_entry_t *t;
    
    CYG_TEST_INFO("ADC test");
    
    for (t = &__DEVTAB__[0]; t != &__DEVTAB_END__; t++) {
        if (t->handlers != &cyg_io_adc_devio)
            continue;
        if (cyg_io_lookup(t->name, &channel) == ENOERR) {
            test_channel(t->name, channel);
        } else {
            CYG_TEST_FAIL_FINISH("Cannot open ADC channel");
        }
    }
    
    CYG_TEST_PASS_FINISH("ADC test OK");
}
Esempio n. 2
0
int main(int argc, char* argv[]) {
    test_pixel();
    test_channel();
    test_pixel_iterator();
    test_image_io();

    const char* local_name = "gil_reference_checksums.txt";
    const char* name_from_status = "../libs/gil/test/gil_reference_checksums.txt";

    std::ifstream file_is_there(local_name);
    if (file_is_there) {
        test_image(local_name);
    } else {
        std::ifstream file_is_there(name_from_status);
        if (file_is_there)
            test_image(name_from_status);
        else {
            std::cerr << "Unable to open gil_reference_checksums.txt"<<std::endl;
            return 1;
        }
    }

    return 0;
}