use v5.36;
use warnings;

use Switch::Right;

use Test2::V0;

plan tests => 12;

ok !warns {
    given ('whatever') {
        when (true)  { pass 'when (true)' }
        default      { fail 'when (true)' }
    }
} => '\___ without warning';

ok !warns {
    given ('whatever') {
        when (false)  { fail 'when (false)' }
        default       { pass 'when (false)' }
    }
}=> '\___ without warning';


ok !warns {
    given ('whatever') {
        when (true())  { pass 'when (true())' }
        default        { fail 'when (true())' }
    }
} => '\___ without warning';

ok !warns {
    given ('whatever') {
        when (false())  { fail 'when (false())' }
        default         { pass 'when (false())' }
    }
}=> '\___ without warning';


ok !warns {
    given ('whatever') {
        when ((true))  { pass 'when ((true))' }
        default        { fail 'when ((true))' }
    }
} => '\___ without warning';

ok !warns {
    given ('whatever') {
        when ((false))  { fail 'when ((false))' }
        default         { pass 'when ((false))' }
    }
}=> '\___ without warning';



done_testing();

