Skip to content

Commit

Permalink
Add is_copy in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Sep 15, 2024
1 parent f502a3f commit f3993ff
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions godot-codegen/src/conv/type_conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,16 +462,28 @@ fn gdscript_to_rust_expr() {
// The 'None' type is used to simulate absence of type information. Some tests are commented out, because this functionality is not
// yet needed. If we ever want to reuse to_rust_expr() in other contexts, we could re-enable them.

let ty_int = RustTy::BuiltinIdent { ty: ident("i64") };
let ty_int = RustTy::BuiltinIdent {
ty: ident("i64"),
is_copy: true,
};
let ty_int = Some(&ty_int);

let ty_int_u16 = RustTy::BuiltinIdent { ty: ident("u16") };
let ty_int_u16 = RustTy::BuiltinIdent {
ty: ident("u16"),
is_copy: true,
};
let ty_int_u16 = Some(&ty_int_u16);

let ty_float = RustTy::BuiltinIdent { ty: ident("f64") };
let ty_float = RustTy::BuiltinIdent {
ty: ident("f64"),
is_copy: true,
};
let ty_float = Some(&ty_float);

let ty_float_f32 = RustTy::BuiltinIdent { ty: ident("f32") };
let ty_float_f32 = RustTy::BuiltinIdent {
ty: ident("f32"),
is_copy: true,
};
let ty_float_f32 = Some(&ty_float_f32);

let ty_enum = RustTy::EngineEnum {
Expand All @@ -490,6 +502,7 @@ fn gdscript_to_rust_expr() {

let ty_variant = RustTy::BuiltinIdent {
ty: ident("Variant"),
is_copy: false,
};
let ty_variant = Some(&ty_variant);

Expand All @@ -501,16 +514,19 @@ fn gdscript_to_rust_expr() {

let ty_string = RustTy::BuiltinIdent {
ty: ident("GString"),
is_copy: true,
};
let ty_string = Some(&ty_string);

let ty_stringname = RustTy::BuiltinIdent {
ty: ident("StringName"),
is_copy: true,
};
let ty_stringname = Some(&ty_stringname);

let ty_nodepath = RustTy::BuiltinIdent {
ty: ident("NodePath"),
is_copy: true,
};
let ty_nodepath = Some(&ty_nodepath);

Expand Down

0 comments on commit f3993ff

Please sign in to comment.