- Timestamp:
- 05/15/09 18:17:07 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/transport_redesign_2/test/t_SimpleTransportMaster.cpp
r1151 r1153 31 31 #define THIS_NAMESPACE t_SimpleTransportMaster 32 32 #include "test_macros.h" 33 #include "test_utils.h" 33 34 34 35 using namespace H2Core; … … 52 53 }; 53 54 54 #define VALID_POS(p, s) { \55 BOOST_REQUIRE( typeid(p) == typeid(H2Core::TransportPosition) ); \56 BOOST_REQUIRE( typeid(s) == typeid(H2Core::Song*) ); \57 CK( (p).bar > 0 ); \58 CK( (p).bar <= song_bar_count(s) ); \59 CK( (p).ticks_per_beat == 48 ); \60 CK( (p).beats_per_bar == (ticks_in_bar((s),(p).bar)/48) ); \61 CK( (p).beat_type == 4 ); \62 CK( (p).beat > 0 ); \63 CK( (p).beat <= (p).beats_per_bar ); \64 CK( (p).tick < ticks_in_bar((s), (p).bar) ); \65 CK( (p).bbt_offset < (p).frames_per_tick() ); \66 CK( (p).bar_start_tick < song_tick_count(s) ); \67 CK( (p).bar_start_tick == bar_start_tick((s), (p).bar) ); \68 CK( ((p).bar_start_tick + (p).tick) < song_tick_count(s) ); \69 }70 55 71 56 … … 81 66 CK( 0 == x.get_current_frame() ); 82 67 x.get_position(&pos); 83 VALID_POS(pos, s);68 H2TEST_VALID_POS(pos, s); 84 69 CK( pos.bar == 1 ); 85 70 CK( pos.beat == 1 ); … … 107 92 TransportPosition pos, posb; 108 93 x.get_position(&pos); 109 VALID_POS(pos, s);94 H2TEST_VALID_POS(pos, s); 110 95 x.processed_frames(1024); 111 96 x.get_position(&posb); 112 VALID_POS(posb, s);97 H2TEST_VALID_POS(posb, s); 113 98 CK( pos.frame == 0 ); 114 99 CK( pos.bbt_offset == 0 ); … … 130 115 for( frame = 0 ; frame <= tot_frames ; frame += delta ) { 131 116 x.get_position(&pos); 132 VALID_POS(pos, s);117 H2TEST_VALID_POS(pos, s); 133 118 134 119 CK( pos.beats_per_minute == 100.0 );