@@ -666,18 +666,8 @@ mod test {
666
666
assert_eq ! ( value. get:: <String >( ) , Ok ( Some ( "return value" . to_string( ) ) ) ) ;
667
667
}
668
668
669
- #[ cfg( not( all( windows, target_pointer_width = "32" ) ) ) ] // Windows 32bits CI fails on this test
670
- #[ test]
671
- #[ should_panic( expected = "Signal required return value of type gchararray but got gboolean" ) ]
672
- fn test_signal_return_wrong_type ( ) {
673
- let obj = Object :: new ( SimpleObject :: get_type ( ) , & [ ] ) . unwrap ( ) ;
674
-
675
- // Returning a `bool` when a `String` was expected
676
- obj. connect ( "create-string" , false , move |_args| Some ( true . to_value ( ) ) )
677
- . unwrap ( ) ;
678
-
679
- let _res = obj. emit ( "create-string" , & [ ] ) ;
680
- }
669
+ // Note: can't test type mismatch in signals since panics accross FFI boundaries
670
+ // are UB. See https://github.com/gtk-rs/glib/issues/518
681
671
682
672
#[ test]
683
673
fn test_signal_return_expected_object_type ( ) {
@@ -695,25 +685,4 @@ mod test {
695
685
let value = obj. emit ( "create-child-object" , & [ ] ) . unwrap ( ) . unwrap ( ) ;
696
686
assert ! ( value. type_( ) . is_a( & ChildObject :: static_type( ) ) ) ;
697
687
}
698
-
699
- #[ cfg( not( all( windows, target_pointer_width = "32" ) ) ) ] // Windows 32bits CI fails on this test
700
- #[ test]
701
- #[ should_panic(
702
- expected = "Signal required return value of type ChildObject but got GObject (actual SimpleObject)"
703
- ) ]
704
- fn test_signal_return_wrong_object_type ( ) {
705
- let obj = Object :: new ( SimpleObject :: get_type ( ) , & [ ] ) . unwrap ( ) ;
706
-
707
- // Returning a `SimpleObject` when a `ChildObject` was expected
708
- obj. connect ( "create-child-object" , false , move |_args| {
709
- Some (
710
- Object :: new ( SimpleObject :: get_type ( ) , & [ ] )
711
- . unwrap ( )
712
- . to_value ( ) ,
713
- )
714
- } )
715
- . unwrap ( ) ;
716
-
717
- let _res = obj. emit ( "create-child-object" , & [ ] ) ;
718
- }
719
688
}
0 commit comments