@@ -366,32 +366,20 @@ fn test_tm_params() {
366366
367367macro_rules! test_range(
368368 ($name:expr, $t:ty, $low:expr, $low_str:expr, $high:expr, $high_str:expr) => ({
369- let tests = [(Some(Range::new(None, None)), ~" ' ( , ) ' "),
370- (Some(Range::new(Some(RangeBound::new($low, Inclusive)),
371- None)),
372- " ' [ " + $low_str + " , ) ' "),
373- (Some(Range::new(Some(RangeBound::new($low, Exclusive)),
374- None)),
375- " ' ( " + $low_str + " , ) ' "),
376- (Some(Range::new(None,
377- Some(RangeBound::new($high, Inclusive)))),
378- " ' ( , " + $high_str + " ] ' "),
379- (Some(Range::new(None,
380- Some(RangeBound::new($high, Exclusive)))),
381- " ' ( , " + $high_str + " ) ' "),
382- (Some(Range::new(Some(RangeBound::new($low, Inclusive)),
383- Some(RangeBound::new($high, Inclusive)))),
369+ let tests = [(Some(range!('(', ')')), ~" ' ( , ) ' "),
370+ (Some(range!('[' $low, ')')), " ' [ " + $low_str + " , ) ' "),
371+ (Some(range!('(' $low, ')')), " ' ( " + $low_str + " , ) ' "),
372+ (Some(range!('(', $high ']')), " ' ( , " + $high_str + " ] ' "),
373+ (Some(range!('(', $high ')')), " ' ( , " + $high_str + " ) ' "),
374+ (Some(range!('[' $low, $high ']')),
384375 " ' [ " + $low_str + " , " + $high_str + " ] ' "),
385- (Some(Range::new(Some(RangeBound::new($low, Inclusive)),
386- Some(RangeBound::new($high, Exclusive)))),
376+ (Some(range!('[' $low, $high ')')),
387377 " ' [ " + $low_str + " , " + $high_str + " ) ' "),
388- (Some(Range::new(Some(RangeBound::new($low, Exclusive)),
389- Some(RangeBound::new($high, Inclusive)))),
378+ (Some(range!('(' $low, $high ']')),
390379 " ' ( " + $low_str + " , " + $high_str + " ] ' "),
391- (Some(Range::new(Some(RangeBound::new($low, Exclusive)),
392- Some(RangeBound::new($high, Exclusive)))),
380+ (Some(range!('(' $low, $high ')')),
393381 " ' ( " + $low_str + " , " + $high_str + " ) ' "),
394- (Some(Range::empty( )), ~" ' empty' "),
382+ (Some(range!(empty )), ~" ' empty' "),
395383 (None, ~" NULL ")];
396384 test_type($name, tests);
397385 })
0 commit comments