feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -1,7 +1,5 @@
|
|||
extends Node
|
||||
|
||||
const Utils = preload("../../utils.notest.gd")
|
||||
|
||||
@export_enum("A", "B", "C") var test_1
|
||||
@export_enum("A", "B", "C",) var test_2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# https://github.com/godotengine/godot/issues/50285
|
||||
|
||||
@warning_ignore("unused_local_constant")
|
||||
@warning_ignore_start("unused_local_constant")
|
||||
func test():
|
||||
const CONST_INNER_DICTIONARY = { "key": true }
|
||||
const CONST_NESTED_DICTIONARY_OLD_WORKAROUND = {
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@ func test():
|
|||
test_instance.number = 42
|
||||
|
||||
var test_sub = TestSub.new()
|
||||
assert(test_sub.number == 25) # From Test.
|
||||
assert(test_sub.other_string == "bye") # From TestSub.
|
||||
Utils.check(test_sub.number == 25) # From Test.
|
||||
Utils.check(test_sub.other_string == "bye") # From TestSub.
|
||||
|
||||
var _test_constructor = TestConstructor.new()
|
||||
_test_constructor = TestConstructor.new(500)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@ func test():
|
|||
const _VECTOR = Vector2(5, 6)
|
||||
const _ARRAY = []
|
||||
const _DICTIONARY = {"this": "dictionary"}
|
||||
const _FLOAT1 = 1e2
|
||||
const _FLOAT2 = 1E2
|
||||
|
||||
# Create user constants from built-in constants.
|
||||
const _HELLO = PI + TAU
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
GDTEST_OK
|
||||
{ "a": 1, "b": 2, "with spaces": 3, "2": 4 }
|
||||
{ &"a": 1, &"b": 2, &"with spaces": 3, &"2": 4 }
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
GDTEST_OK
|
||||
{ "hello": { "world": { "is": "beautiful" } } }
|
||||
{ "hello": { &"world": { "is": "beautiful" } } }
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
const Utils = preload("../../utils.notest.gd")
|
||||
|
||||
@export_dir var test_dir: Array[String]
|
||||
@export_dir var test_dir_packed: PackedStringArray
|
||||
@export_file var test_file: Array[String]
|
||||
|
|
|
|||
|
|
@ -80,21 +80,21 @@ var test_placeholder: Array
|
|||
var test_placeholder_packed: PackedStringArray
|
||||
hint=TYPE_STRING hint_string="<String>/<PLACEHOLDER_TEXT>:Placeholder" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_int: Array
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_int_packed_byte: PackedByteArray
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_int_packed32: PackedInt32Array
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_int_packed64: PackedInt64Array
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_int_float_step: Array
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10,0.01" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0,0.01" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_float: Array
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_float_packed32: PackedFloat32Array
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_float_packed64: PackedFloat64Array
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_exp_easing: Array
|
||||
hint=TYPE_STRING hint_string="<float>/<EXP_EASING>:" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_exp_easing_packed32: PackedFloat32Array
|
||||
|
|
@ -126,14 +126,14 @@ var test_weak_packed_vector3_array: PackedVector3Array
|
|||
var test_weak_packed_vector4_array: PackedVector4Array
|
||||
hint=TYPE_STRING hint_string="<Vector4>:" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_weak_packed_byte_array: PackedByteArray
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_weak_packed_int32_array: PackedInt32Array
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_weak_packed_int64_array: PackedInt64Array
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<int>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_weak_packed_float32_array: PackedFloat32Array
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_weak_packed_float64_array: PackedFloat64Array
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1,10" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=TYPE_STRING hint_string="<float>/<RANGE>:1.0,10.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_noalpha_weak_packed_color_array: PackedColorArray
|
||||
hint=TYPE_STRING hint_string="<Color>/<COLOR_NO_ALPHA>:" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
const Utils = preload("../../utils.notest.gd")
|
||||
|
||||
@export_enum("Red", "Green", "Blue") var test_untyped
|
||||
@export_enum("Red:10", "Green:20", "Blue:30") var test_with_values
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
@tool
|
||||
class_name ExportVariableTest
|
||||
extends Node
|
||||
|
||||
const Utils = preload("../../utils.notest.gd")
|
||||
const PreloadedGlobalClass = preload("./export_variable_global.notest.gd")
|
||||
const PreloadedUnnamedClass = preload("./export_variable_unnamed.notest.gd")
|
||||
|
||||
|
|
@ -48,6 +48,10 @@ const PreloadedUnnamedClass = preload("./export_variable_unnamed.notest.gd")
|
|||
@export_custom(PROPERTY_HINT_ENUM, "A,B,C") var test_export_custom_weak_int = 5
|
||||
@export_custom(PROPERTY_HINT_ENUM, "A,B,C") var test_export_custom_hard_int: int = 6
|
||||
|
||||
# `@export_tool_button`.
|
||||
@export_tool_button("Click me!") var test_tool_button_1: Callable
|
||||
@export_tool_button("Click me!", "ColorRect") var test_tool_button_2: Callable
|
||||
|
||||
func test():
|
||||
for property in get_property_list():
|
||||
if str(property.name).begins_with("test_"):
|
||||
|
|
|
|||
|
|
@ -4,11 +4,11 @@ var test_weak_int: int = 1
|
|||
var test_hard_int: int = 2
|
||||
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range: int = 100
|
||||
hint=RANGE hint_string="0,100" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=RANGE hint_string="0.0,100.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_step: int = 101
|
||||
hint=RANGE hint_string="0,100,1" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=RANGE hint_string="0.0,100.0,1.0" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_range_step_or_greater: int = 102
|
||||
hint=RANGE hint_string="0,100,1,or_greater" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
hint=RANGE hint_string="0.0,100.0,1.0,or_greater" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_color: Color = Color(0, 0, 0, 1)
|
||||
hint=NONE hint_string="" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_color_no_alpha: Color = Color(0, 0, 0, 1)
|
||||
|
|
@ -55,3 +55,7 @@ var test_export_custom_weak_int: int = 5
|
|||
hint=ENUM hint_string="A,B,C" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_export_custom_hard_int: int = 6
|
||||
hint=ENUM hint_string="A,B,C" usage=DEFAULT|SCRIPT_VARIABLE class_name=&""
|
||||
var test_tool_button_1: Callable = Callable()
|
||||
hint=TOOL_BUTTON hint_string="Click me!" usage=EDITOR|SCRIPT_VARIABLE class_name=&""
|
||||
var test_tool_button_2: Callable = Callable()
|
||||
hint=TOOL_BUTTON hint_string="Click me!,ColorRect" usage=EDITOR|SCRIPT_VARIABLE class_name=&""
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ func test():
|
|||
j_string += str(j)
|
||||
return j_string
|
||||
i_string += lambda.call()
|
||||
assert(i_string == '0202')
|
||||
Utils.check(i_string == '0202')
|
||||
print('ok')
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 9
|
||||
>> UNUSED_VARIABLE
|
||||
>> The local variable "value" is declared but never used in the block. If this is intended, prefix it with an underscore: "_value".
|
||||
~~ WARNING at line 9: (UNUSED_VARIABLE) The local variable "value" is declared but never used in the block. If this is intended, prefix it with an underscore: "_value".
|
||||
value
|
||||
|
|
|
|||
|
|
@ -1,72 +1,21 @@
|
|||
GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
>> WARNING
|
||||
>> Line: 19
|
||||
>> INTEGER_DIVISION
|
||||
>> Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
~~ WARNING at line 19: (INTEGER_DIVISION) Integer division, decimal part will be discarded.
|
||||
2.718
|
||||
|
||||
2.718
|
||||
|
|
|
|||
|
|
@ -13,4 +13,4 @@ true
|
|||
0
|
||||
-255
|
||||
256
|
||||
2
|
||||
2.0
|
||||
|
|
|
|||
|
|
@ -13,12 +13,12 @@ GDTEST_OK
|
|||
---
|
||||
-1234.4567
|
||||
-1234.4567
|
||||
-1234
|
||||
-1234
|
||||
-1234.0
|
||||
-1234.0
|
||||
0.4567
|
||||
0.4567
|
||||
---
|
||||
-1234500
|
||||
-1234500
|
||||
-1234500
|
||||
-1234500
|
||||
-1234500.0
|
||||
-1234500.0
|
||||
-1234500.0
|
||||
-1234500.0
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
GDTEST_OK
|
||||
8
|
||||
8.0
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
@warning_ignore_start("unused_signal")
|
||||
|
||||
# No parentheses.
|
||||
signal a
|
||||
|
||||
|
|
@ -17,12 +19,5 @@ signal d(
|
|||
# With type hints.
|
||||
signal e(a: int, b: Variant, c: Node)
|
||||
|
||||
func no_exec():
|
||||
a.emit()
|
||||
b.emit()
|
||||
c.emit()
|
||||
d.emit()
|
||||
e.emit()
|
||||
|
||||
func test():
|
||||
print("Ok")
|
||||
|
|
|
|||
|
|
@ -1,30 +1,32 @@
|
|||
func test():
|
||||
# The assertions below should all evaluate to `true` for this test to pass.
|
||||
assert(true)
|
||||
assert(not false)
|
||||
assert(500)
|
||||
assert(not 0)
|
||||
assert(500.5)
|
||||
assert(not 0.0)
|
||||
assert("non-empty string")
|
||||
assert(["non-empty array"])
|
||||
assert({"non-empty": "dictionary"})
|
||||
assert(Vector2(1, 0))
|
||||
assert(Vector2i(-1, -1))
|
||||
assert(Vector3(0, 0, 0.0001))
|
||||
assert(Vector3i(0, 0, 10000))
|
||||
# The checks below should all evaluate to `true` for this test to pass.
|
||||
Utils.check(true)
|
||||
Utils.check(not false)
|
||||
Utils.check(500)
|
||||
Utils.check(not 0)
|
||||
Utils.check(500.5)
|
||||
Utils.check(not 0.0)
|
||||
Utils.check("non-empty string")
|
||||
Utils.check(["non-empty array"])
|
||||
Utils.check({"non-empty": "dictionary"})
|
||||
Utils.check(Vector2(1, 0))
|
||||
Utils.check(Vector2i(-1, -1))
|
||||
Utils.check(Vector3(0, 0, 0.0001))
|
||||
Utils.check(Vector3i(0, 0, 10000))
|
||||
|
||||
# Zero position is `true` only if the Rect2's size is non-zero.
|
||||
assert(Rect2(0, 0, 0, 1))
|
||||
Utils.check(Rect2(0, 0, 0, 1))
|
||||
|
||||
# Zero size is `true` only if the position is non-zero.
|
||||
assert(Rect2(1, 1, 0, 0))
|
||||
Utils.check(Rect2(1, 1, 0, 0))
|
||||
|
||||
# Zero position is `true` only if the Rect2's size is non-zero.
|
||||
assert(Rect2i(0, 0, 0, 1))
|
||||
Utils.check(Rect2i(0, 0, 0, 1))
|
||||
|
||||
# Zero size is `true` only if the position is non-zero.
|
||||
assert(Rect2i(1, 1, 0, 0))
|
||||
Utils.check(Rect2i(1, 1, 0, 0))
|
||||
|
||||
# A fully black color is only truthy if its alpha component is not equal to `1`.
|
||||
assert(Color(0, 0, 0, 0.5))
|
||||
Utils.check(Color(0, 0, 0, 0.5))
|
||||
|
||||
print("ok")
|
||||
|
|
|
|||
|
|
@ -1,65 +1,2 @@
|
|||
GDTEST_OK
|
||||
>> WARNING
|
||||
>> Line: 3
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 4
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 5
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 6
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 7
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 8
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 9
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 12
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 13
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 14
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 15
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 18
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 21
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 24
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 27
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
>> WARNING
|
||||
>> Line: 30
|
||||
>> ASSERT_ALWAYS_TRUE
|
||||
>> Assert statement is redundant because the expression is always true.
|
||||
ok
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
func test():
|
||||
var my_dictionary: Dictionary[int, String] = { 1: "one", 2: "two", 3: "three" }
|
||||
var inferred_dictionary := { 1: "one", 2: "two", 3: "three" } # This is Dictionary[int, String].
|
||||
print(my_dictionary)
|
||||
print(inferred_dictionary)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
GDTEST_OK
|
||||
{ 1: "one", 2: "two", 3: "three" }
|
||||
{ 1: "one", 2: "two", 3: "three" }
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
@warning_ignore_start("unreachable_code", "narrowing_conversion")
|
||||
|
||||
var _a = 1
|
||||
@warning_ignore_start("unused_private_class_variable")
|
||||
var _b = 2
|
||||
var _c = 3
|
||||
@warning_ignore_restore("unused_private_class_variable")
|
||||
var _d = 4
|
||||
|
||||
func test():
|
||||
return
|
||||
|
||||
var a = 1
|
||||
@warning_ignore_start("unused_variable")
|
||||
var b = 2
|
||||
var c = 3
|
||||
@warning_ignore_restore("unused_variable")
|
||||
var d = 4
|
||||
|
||||
var _x: int = 1.0
|
||||
@warning_ignore_restore("narrowing_conversion")
|
||||
var _y: int = 1.0
|
||||
|
||||
func test_2():
|
||||
return
|
||||
print(42)
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
GDTEST_OK
|
||||
~~ WARNING at line 3: (UNUSED_PRIVATE_CLASS_VARIABLE) The class variable "_a" is declared but never used in the class.
|
||||
~~ WARNING at line 8: (UNUSED_PRIVATE_CLASS_VARIABLE) The class variable "_d" is declared but never used in the class.
|
||||
~~ WARNING at line 13: (UNUSED_VARIABLE) The local variable "a" is declared but never used in the block. If this is intended, prefix it with an underscore: "_a".
|
||||
~~ WARNING at line 18: (UNUSED_VARIABLE) The local variable "d" is declared but never used in the block. If this is intended, prefix it with an underscore: "_d".
|
||||
~~ WARNING at line 22: (NARROWING_CONVERSION) Narrowing conversion (float is converted to int and loses precision).
|
||||
Loading…
Add table
Add a link
Reference in a new issue