Changeset 2013 for trunk


Ignore:
Timestamp:
Apr 10, 2012, 12:02:06 AM (7 years ago)
Author:
ksherdy
Message:

Updated Scanner tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtest/bitscantest.cpp

    r2012 r2013  
    2525        }
    2626
     27        t = simd<128>::constant<0>();
     28
     29        ForwardScanner<BitBlock, scanword_t> f(&t);
     30
     31        f.scan_to_next();               
     32        if (f.get_pos() != -1) {
     33                failed_tests++;
     34                cout << "Test failure: ForwardScanner Expected: " << -1 << " Actual: " << f.get_pos() << endl;
     35        }
     36
     37        ReverseScanner<BitBlock, scanword_t> r(&t);
     38
     39        r.scan_to_next();               
     40        if (r.get_pos() != -1) {
     41                failed_tests++;
     42                cout << "Test failure: ReverseScanner Expected: " << -1 << " Actual: " << r.get_pos() << endl;
     43        }
     44
     45
     46
    2747        t = simd<128>::constant<1>();
    2848
     
    3656                if (f.get_pos() != i) {
    3757                        failed_tests++;
    38                         cout << "Test failure: count_forward_zeroes(bitblock::sll(one, " << i << ") == " << f.get_pos() << endl;
     58                        cout << "Test failure: ForwardScanner Expected: " << i << " Actual: " << f.get_pos() << endl;
    3959                }
    4060
     
    4262                if (r.get_pos() != i) {
    4363                        failed_tests++;
    44                         cout << "Test failure: count_reverse_zeroes(bitblock::sll(one, " << i << ") == " << r.get_pos() << endl;
     64                        cout << "Test failure: ReverseScanner Expected: " << i << " Actual: " << f.get_pos() << endl;
     65
    4566                }
    4667        }
Note: See TracChangeset for help on using the changeset viewer.