File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -221,3 +221,12 @@ fn test_vec_type() {
221
221
222
222
assert_eq ! ( vec_type. get_size( ) , 42 ) ;
223
223
}
224
+
225
+ #[ test]
226
+ fn test_type_copies ( ) {
227
+ let context = Context :: create ( ) ;
228
+ let i8_type = context. i8_type ( ) ;
229
+ let i8_type_copy = i8_type;
230
+
231
+ assert_eq ! ( i8_type, i8_type_copy) ;
232
+ }
Original file line number Diff line number Diff line change @@ -683,3 +683,14 @@ fn test_int_from_string() {
683
683
684
684
assert_eq ! ( i8_val. print_to_string( ) , & * CString :: new( "i8 -15" ) . unwrap( ) ) ;
685
685
}
686
+
687
+ #[ test]
688
+ fn test_value_copies ( ) {
689
+ let context = Context :: create ( ) ;
690
+ let i8_type = context. i8_type ( ) ;
691
+
692
+ let i8_value = i8_type. const_int ( 12 , false ) ;
693
+ let i8_value_copy = i8_value;
694
+
695
+ assert_eq ! ( i8_value, i8_value_copy) ;
696
+ }
You can’t perform that action at this time.
0 commit comments