Bladeren bron

Merge pull request #99490 from dalexeev/gds-tests-track-multiple-errors

GDScript: Support tracking multiple analyzer and runtime errors in tests
Rémi Verschelde 8 maanden geleden
bovenliggende
commit
b3a44a5567
100 gewijzigde bestanden met toevoegingen van 166 en 148 verwijderingen
  1. 2 2
      .pre-commit-config.yaml
  2. 35 40
      modules/gdscript/tests/gdscript_test_runner.cpp
  3. 3 2
      modules/gdscript/tests/scripts/.editorconfig
  4. 8 0
      modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.gd
  5. 4 1
      modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.out
  6. 0 9
      modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.gd
  7. 0 2
      modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.out
  8. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out
  9. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/assign_enum.out
  10. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/assign_named_enum.out
  11. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/assign_signal.out
  12. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property.out
  13. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property_indirectly.out
  14. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/assymetric_assignment_bad.out
  15. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/await_signal_no_infer.out
  16. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out
  17. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out
  18. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/call_not_existing_static_method.out
  19. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_array.out
  20. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_object.out
  21. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/cast_object_to_int.out
  22. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out
  23. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/constant_array_index_assign.out
  24. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/constant_dictionary_index_assign.out
  25. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out
  26. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/constant_subscript_type.out
  27. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out
  28. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/constructor_call_type.out
  29. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_inheritance.out
  30. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_const.out
  31. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum.out
  32. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum_value.out
  33. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external.out
  34. 2 0
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external_a.notest.gd
  35. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_func.out
  36. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_override.out
  37. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var.out
  38. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out
  39. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out
  40. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out
  41. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out
  42. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out
  43. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out
  44. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_bad_method.out
  45. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out
  46. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out
  47. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out
  48. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_duplicate_bad_method.out
  49. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out
  50. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out
  51. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out
  52. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out
  53. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out
  54. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out
  55. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out
  56. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out
  57. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out
  58. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_shadows_base_enum.out
  59. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out
  60. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out
  61. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_1.out
  62. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_2.out
  63. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_3.out
  64. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out
  65. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out
  66. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out
  67. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out
  68. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out
  69. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out
  70. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_float.out
  71. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_int.out
  72. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_enum_value.out
  73. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_float.out
  74. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_int.out
  75. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_iterator.out
  76. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_string.out
  77. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_bool.out
  78. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_int.out
  79. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type.out
  80. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_array.out
  81. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_dictionary.out
  82. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_less.out
  83. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_more.out
  84. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_default_values.out
  85. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_type.out
  86. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_return_type.out
  87. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_1.out
  88. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_2.out
  89. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_3.out
  90. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_1.out
  91. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_2.out
  92. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_3.out
  93. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_4.out
  94. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out
  95. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out
  96. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_in_static_function.out
  97. 2 1
      modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_within_non_node.out
  98. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/incompatible_assignment.out
  99. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_local_variable.out
  100. 1 1
      modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_member_variable.out

+ 2 - 2
.pre-commit-config.yaml

@@ -184,8 +184,8 @@ repos:
             .*\.patch$|
             .*\.out$|
             modules/gdscript/tests/scripts/parser/features/mixed_indentation_on_blank_lines\.gd$|
-            modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.notest\.gd$|
-            modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.notest\.gd$|
+            modules/gdscript/tests/scripts/parser/warnings/empty_file_newline_comment\.norun\.gd$|
+            modules/gdscript/tests/scripts/parser/warnings/empty_file_newline\.norun\.gd$|
             platform/android/java/editor/src/main/java/com/android/.*|
             platform/android/java/lib/src/com/google/.*|
             tests/data/.*\.bin$

+ 35 - 40
modules/gdscript/tests/gdscript_test_runner.cpp

@@ -176,7 +176,7 @@ static String strip_warnings(const String &p_expected) {
 	// so it doesn't fail just because of difference in warnings.
 	String expected_no_warnings;
 	for (String line : p_expected.split("\n")) {
-		if (line.begins_with(">> ")) {
+		if (line.begins_with("~~ ")) {
 			continue;
 		}
 		expected_no_warnings += line + "\n";
@@ -275,6 +275,7 @@ bool GDScriptTestRunner::make_tests_for_dir(const String &p_dir) {
 				return false;
 			}
 		} else {
+			// `*.notest.gd` files are skipped.
 			if (next.ends_with(".notest.gd")) {
 				next = dir->get_next();
 				continue;
@@ -450,47 +451,43 @@ void GDScriptTest::error_handler(void *p_this, const char *p_function, const cha
 
 	result->status = GDTEST_RUNTIME_ERROR;
 
-	StringBuilder builder;
-	builder.append(">> ");
-	// Only include the function, file and line for script errors, otherwise the
-	// test outputs changes based on the platform/compiler.
+	// Only include the file, line, and function for script errors,
+	// otherwise the test outputs changes based on the platform/compiler.
+	String header;
 	bool include_source_info = false;
 	switch (p_type) {
 		case ERR_HANDLER_ERROR:
-			builder.append("ERROR");
+			header = "ERROR";
 			break;
 		case ERR_HANDLER_WARNING:
-			builder.append("WARNING");
+			header = "WARNING";
 			break;
 		case ERR_HANDLER_SCRIPT:
-			builder.append("SCRIPT ERROR");
+			header = "SCRIPT ERROR";
 			include_source_info = true;
 			break;
 		case ERR_HANDLER_SHADER:
-			builder.append("SHADER ERROR");
+			header = "SHADER ERROR";
 			break;
 		default:
-			builder.append("Unknown error type");
+			header = "UNKNOWN ERROR";
 			break;
 	}
 
 	if (include_source_info) {
-		builder.append("\n>> on function: ");
-		builder.append(String::utf8(p_function));
-		builder.append("()\n>> ");
-		builder.append(String::utf8(p_file).trim_prefix(self->base_dir).replace("\\", "/"));
-		builder.append("\n>> ");
-		builder.append(itos(p_line));
-	}
-	builder.append("\n>> ");
-	builder.append(String::utf8(p_error));
+		header += vformat(" at %s:%d on %s()",
+				String::utf8(p_file).trim_prefix(self->base_dir).replace("\\", "/"),
+				p_line,
+				String::utf8(p_function));
+	}
+
+	StringBuilder error_string;
+	error_string.append(vformat(">> %s: %s\n", header, String::utf8(p_error)));
 	if (strlen(p_explanation) > 0) {
-		builder.append("\n>> ");
-		builder.append(String::utf8(p_explanation));
+		error_string.append(vformat(">>   %s\n", String::utf8(p_explanation)));
 	}
-	builder.append("\n");
 
-	result->output = builder.as_string();
+	result->output += error_string.as_string();
 }
 
 bool GDScriptTest::check_output(const String &p_output) const {
@@ -588,11 +585,11 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
 		result.status = GDTEST_ANALYZER_ERROR;
 		result.output = get_text_for_status(result.status) + "\n";
 
-		const List<GDScriptParser::ParserError> &errors = parser.get_errors();
-		if (!errors.is_empty()) {
-			// Only the first error since the following might be cascading.
-			result.output += errors.front()->get().message + "\n"; // TODO: line, column?
+		StringBuilder error_string;
+		for (const GDScriptParser::ParserError &error : parser.get_errors()) {
+			error_string.append(vformat(">> ERROR at line %d: %s\n", error.line, error.message));
 		}
+		result.output += error_string.as_string();
 		if (!p_is_generating) {
 			result.passed = check_output(result.output);
 		}
@@ -601,16 +598,8 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
 
 #ifdef DEBUG_ENABLED
 	StringBuilder warning_string;
-	for (const GDScriptWarning &E : parser.get_warnings()) {
-		const GDScriptWarning warning = E;
-		warning_string.append(">> WARNING");
-		warning_string.append("\n>> Line: ");
-		warning_string.append(itos(warning.start_line));
-		warning_string.append("\n>> ");
-		warning_string.append(warning.get_name());
-		warning_string.append("\n>> ");
-		warning_string.append(warning.get_message());
-		warning_string.append("\n");
+	for (const GDScriptWarning &warning : parser.get_warnings()) {
+		warning_string.append(vformat("~~ WARNING at line %d: (%s) %s\n", warning.start_line, warning.get_name(), warning.get_message()));
 	}
 	result.output += warning_string.as_string();
 #endif
@@ -628,12 +617,18 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
 		}
 		return result;
 	}
-	// Script files matching this pattern are allowed to not contain a test() function.
-	if (source_file.match("*.notest.gd")) {
+
+	// `*.norun.gd` files are allowed to not contain a `test()` function (no runtime testing).
+	if (source_file.ends_with(".norun.gd")) {
 		enable_stdout();
-		result.passed = check_output(result.output);
+		result.status = GDTEST_OK;
+		result.output = get_text_for_status(result.status) + "\n" + result.output;
+		if (!p_is_generating) {
+			result.passed = check_output(result.output);
+		}
 		return result;
 	}
+
 	// Test running.
 	const HashMap<StringName, GDScriptFunction *>::ConstIterator test_function_element = script->get_member_functions().find(GDScriptTestRunner::test_function_name);
 	if (!test_function_element) {

+ 3 - 2
modules/gdscript/tests/scripts/.editorconfig

@@ -1,10 +1,11 @@
 # Some tests handle invalid syntax deliberately; exclude relevant attributes.
+# See also the `file-format` section in `.pre-commit-config.yaml`.
 
 [parser/features/mixed_indentation_on_blank_lines.gd]
 trim_trailing_whitespace = false
 
-[parser/warnings/empty_file_newline.notest.gd]
+[parser/warnings/empty_file_newline.norun.gd]
 insert_final_newline = false
 
-[parser/warnings/empty_file_newline_comment.notest.gd]
+[parser/warnings/empty_file_newline_comment.norun.gd]
 insert_final_newline = false

+ 8 - 0
modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.gd

@@ -1,2 +1,10 @@
+class A extends InstancePlaceholder:
+	func _init():
+		print('no')
+
+class B extends A:
+	pass
+
 func test():
 	InstancePlaceholder.new()
+	B.new()

+ 4 - 1
modules/gdscript/tests/scripts/analyzer/errors/abstract_class_instantiate.out

@@ -1,2 +1,5 @@
 GDTEST_ANALYZER_ERROR
-Native class "InstancePlaceholder" cannot be constructed as it is abstract.
+>> ERROR at line 9: Native class "InstancePlaceholder" cannot be constructed as it is abstract.
+>> ERROR at line 9: Name "new" is a Callable. You can call it with "new.call()" instead.
+>> ERROR at line 10: Class "abstract_class_instantiate.gd::B" cannot be constructed as it is based on abstract native class "InstancePlaceholder".
+>> ERROR at line 10: Name "new" is a Callable. You can call it with "new.call()" instead.

+ 0 - 9
modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.gd

@@ -1,9 +0,0 @@
-class A extends InstancePlaceholder:
-	func _init():
-		print('no')
-
-class B extends A:
-	pass
-
-func test():
-	B.new()

+ 0 - 2
modules/gdscript/tests/scripts/analyzer/errors/abstract_script_instantiate.out

@@ -1,2 +0,0 @@
-GDTEST_ANALYZER_ERROR
-Class "abstract_script_instantiate.gd::B" cannot be constructed as it is based on abstract native class "InstancePlaceholder".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/annotation_non_constant_parameter.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Argument 1 of annotation "@export_range" isn't a constant expression.
+>> ERROR at line 3: Argument 1 of annotation "@export_range" isn't a constant expression.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/assign_enum.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a constant.
+>> ERROR at line 3: Cannot assign a new value to a constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/assign_named_enum.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a constant.
+>> ERROR at line 3: Cannot assign a new value to a constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/assign_signal.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a constant.
+>> ERROR at line 4: Cannot assign a new value to a constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a read-only property.
+>> ERROR at line 3: Cannot assign a new value to a read-only property.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/assign_to_read_only_property_indirectly.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a read-only property.
+>> ERROR at line 3: Cannot assign a new value to a read-only property.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/assymetric_assignment_bad.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "Color" as "String".
+>> ERROR at line 2: Cannot assign a value of type "Color" as "String".
+>> ERROR at line 2: Cannot assign a value of type Color to variable "var_color" with specified type String.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/await_signal_no_infer.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot infer the type of "_a" variable because the value doesn't have a set type.
+>> ERROR at line 4: Cannot infer the type of "_a" variable because the value doesn't have a set type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_left_operand.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid operands to operator <<, float and int.
+>> ERROR at line 3: Invalid operands to operator <<, float and int.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/bitwise_float_right_operand.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid operands to operator >>, int and float.
+>> ERROR at line 3: Invalid operands to operator >>, int and float.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/call_not_existing_static_method.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Static function "not_existing_method()" not found in base "MyClass".
+>> ERROR at line 7: Static function "not_existing_method()" not found in base "MyClass".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_array.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid cast. Cannot convert from "int" to "Array".
+>> ERROR at line 3: Invalid cast. Cannot convert from "int" to "Array".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/cast_int_to_object.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid cast. Cannot convert from "int" to "Node".
+>> ERROR at line 3: Invalid cast. Cannot convert from "int" to "Node".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/cast_object_to_int.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid cast. Cannot convert from "RefCounted" to "int".
+>> ERROR at line 3: Invalid cast. Cannot convert from "RefCounted" to "int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/class_name_shadows_builtin_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Class "Vector2" hides a built-in type.
+>> ERROR at line 1: Class "Vector2" hides a built-in type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/constant_array_index_assign.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a constant.
+>> ERROR at line 5: Cannot assign a new value to a constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/constant_dictionary_index_assign.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a constant.
+>> ERROR at line 5: Cannot assign a new value to a constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/constant_name_shadows_builtin_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The member "Vector2" cannot have the same name as a builtin type.
+>> ERROR at line 1: The member "Vector2" cannot have the same name as a builtin type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/constant_subscript_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "int" so it can't be of type "String".
+>> ERROR at line 5: Expression is of type "int" so it can't be of type "String".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/constant_used_as_function.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Member "CONSTANT" is not a function.
+>> ERROR at line 5: Member "CONSTANT" is not a function.
+>> ERROR at line 5: Name "CONSTANT" called as a function but is a "int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/constructor_call_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "B" so it can't be of type "C".
+>> ERROR at line 10: Expression is of type "B" so it can't be of type "C".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_inheritance.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cyclic inheritance.
+>> ERROR at line 4: Cyclic inheritance.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_const.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "c1": Cyclic reference.
+>> ERROR at line 5: Could not resolve member "c1": Cyclic reference.
+>> ERROR at line 5: Could not resolve type for constant "c2".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "E1": Cyclic reference.
+>> ERROR at line 5: Could not resolve member "E1": Cyclic reference.
+>> ERROR at line 5: Enum values must be constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_enum_value.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "EV1": Cyclic reference.
+>> ERROR at line 5: Could not resolve member "EV1": Cyclic reference.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve external class member "v".
+>> ERROR at line 4: Could not resolve external class member "v".
+>> ERROR at line 4: Cannot find member "v" in base "TestCyclicRefExternalA".

+ 2 - 0
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_external_a.notest.gd

@@ -1,3 +1,5 @@
+class_name TestCyclicRefExternalA
+
 const B = preload("cyclic_ref_external.gd")
 
 var v = B.v

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_func.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "f1": Cyclic reference.
+>> ERROR at line 8: Could not resolve member "f1": Cyclic reference.
+>> ERROR at line 8: Cannot infer the type of "p" parameter because the value doesn't have a set type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_override.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "f": Cyclic reference.
+>> ERROR at line 11: Could not resolve member "f": Cyclic reference.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "v1": Cyclic reference.
+>> ERROR at line 5: Could not resolve member "v1": Cyclic reference.
+>> ERROR at line 5: Cannot infer the type of "v2" variable because the value doesn't have a set type.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/cyclic_ref_var_self.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Could not resolve member "v1": Cyclic reference.
+>> ERROR at line 1: Could not resolve member "v1": Cyclic reference.
+>> ERROR at line 1: Could not resolve type for variable "v1".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Key "a" was already used in this dictionary (at line 3).
+>> ERROR at line 5: Key "a" was already used in this dictionary (at line 3).

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_lua_with_string.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Key "a" was already used in this dictionary (at line 3).
+>> ERROR at line 5: Key "a" was already used in this dictionary (at line 3).

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/dictionary_duplicate_key_python.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Key "a" was already used in this dictionary (at line 3).
+>> ERROR at line 5: Key "a" was already used in this dictionary (at line 3).

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/dictionary_string_stringname_equivalent.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Key "key" was already used in this dictionary (at line 5).
+>> ERROR at line 6: Key "key" was already used in this dictionary (at line 5).

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/engine_singleton_instantiate.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot construct native class "Time" because it is an engine singleton.
+>> ERROR at line 2: Cannot construct native class "Time" because it is an engine singleton.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_bad_method.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot call non-const Dictionary function "clear()" on enum "Enum".
+>> ERROR at line 4: Cannot call non-const Dictionary function "clear()" on enum "Enum".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_bad_value.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot find member "V3" in base "enum_bad_value.gd.Enum".
+>> ERROR at line 4: Cannot find member "V3" in base "enum_bad_value.gd.Enum".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_assign_with_wrong_enum_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 9: Cannot assign a value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 9: Value of type "enum_class_var_assign_with_wrong_enum_type.gd.MyOtherEnum" cannot be assigned to a variable of type "enum_class_var_assign_with_wrong_enum_type.gd.MyEnum".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_class_var_init_with_wrong_enum_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_init_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 5: Cannot assign a value of type "enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_class_var_init_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 5: Cannot assign a value of type enum_class_var_init_with_wrong_enum_type.gd.MyOtherEnum to variable "class_var" with specified type enum_class_var_init_with_wrong_enum_type.gd.MyEnum.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_duplicate_bad_method.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot call non-const Dictionary function "clear()" on enum "Enum".
+>> ERROR at line 5: Cannot call non-const Dictionary function "clear()" on enum "Enum".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_float_value.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Enum values must be integers.
+>> ERROR at line 3: Enum values must be integers.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_function_parameter_wrong_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot pass a value of type "enum_function_parameter_wrong_type.gd.MyOtherEnum" as "enum_function_parameter_wrong_type.gd.MyEnum".
+>> ERROR at line 8: Cannot pass a value of type "enum_function_parameter_wrong_type.gd.MyOtherEnum" as "enum_function_parameter_wrong_type.gd.MyEnum".
+>> ERROR at line 8: Invalid argument for "enum_func()" function: argument 1 should be "enum_function_parameter_wrong_type.gd.MyEnum" but is "enum_function_parameter_wrong_type.gd.MyOtherEnum".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_function_return_wrong_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot return a value of type "enum_function_return_wrong_type.gd.MyOtherEnum" as "enum_function_return_wrong_type.gd.MyEnum".
+>> ERROR at line 5: Cannot return a value of type "enum_function_return_wrong_type.gd.MyOtherEnum" as "enum_function_return_wrong_type.gd.MyEnum".
+>> ERROR at line 5: Cannot return value of type "enum_function_return_wrong_type.gd.MyOtherEnum" because the function return type is "enum_function_return_wrong_type.gd.MyEnum".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_outer_with_wrong_enum_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" as "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 9: Cannot assign a value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" as "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 9: Value of type "enum_local_var_assign_outer_with_wrong_enum_type.gd::InnerClass.MyEnum" cannot be assigned to a variable of type "enum_local_var_assign_outer_with_wrong_enum_type.gd.MyEnum".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_assign_with_wrong_enum_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 7: Cannot assign a value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 7: Value of type "enum_local_var_assign_with_wrong_enum_type.gd.MyOtherEnum" cannot be assigned to a variable of type "enum_local_var_assign_with_wrong_enum_type.gd.MyEnum".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_local_var_init_with_wrong_enum_type.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_init_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 5: Cannot assign a value of type "enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum" as "enum_local_var_init_with_wrong_enum_type.gd.MyEnum".
+>> ERROR at line 5: Cannot assign a value of type enum_local_var_init_with_wrong_enum_type.gd.MyOtherEnum to variable "local_var" with specified type enum_local_var_init_with_wrong_enum_type.gd.MyEnum.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_name_shadows_builtin_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The member "Vector2" cannot have the same name as a builtin type.
+>> ERROR at line 1: The member "Vector2" cannot have the same name as a builtin type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_native_bad_value.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot find member "THIS_DOES_NOT_EXIST" in base "TileSet.TileShape".
+>> ERROR at line 2: Cannot find member "THIS_DOES_NOT_EXIST" in base "TileSet.TileShape".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_preload_unnamed_assign_to_named.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_value_from_parent.gd.<anonymous enum>" as "enum_preload_unnamed_assign_to_named.gd.MyEnum".
+>> ERROR at line 6: Cannot assign a value of type "enum_value_from_parent.gd.<anonymous enum>" as "enum_preload_unnamed_assign_to_named.gd.MyEnum".
+>> ERROR at line 6: Value of type "enum_value_from_parent.gd.<anonymous enum>" cannot be assigned to a variable of type "enum_preload_unnamed_assign_to_named.gd.MyEnum".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_shadows_base_enum.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The member "V" already exists in parent class A.
+>> ERROR at line 5: The member "V" already exists in parent class A.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_string_value.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Enum values must be integers.
+>> ERROR at line 3: Enum values must be integers.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/enum_unnamed_assign_to_named.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a value of type "enum_unnamed_assign_to_named.gd.<anonymous enum>" as "enum_unnamed_assign_to_named.gd.MyEnum".
+>> ERROR at line 6: Cannot assign a value of type "enum_unnamed_assign_to_named.gd.<anonymous enum>" as "enum_unnamed_assign_to_named.gd.MyEnum".
+>> ERROR at line 6: Cannot assign a value of type enum_unnamed_assign_to_named.gd.<anonymous enum> to variable "local_var" with specified type enum_unnamed_assign_to_named.gd.MyEnum.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_1.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Node export is only supported in Node-derived classes, but the current class inherits "Resource".
+>> ERROR at line 5: Node export is only supported in Node-derived classes, but the current class inherits "Resource".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_2.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Node export is only supported in Node-derived classes, but the current class inherits "RefCounted".
+>> ERROR at line 6: Node export is only supported in Node-derived classes, but the current class inherits "RefCounted".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/export_node_in_non_node_derived_class_3.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Node export is only supported in Node-derived classes, but the current class inherits "Resource".
+>> ERROR at line 5: Node export is only supported in Node-derived classes, but the current class inherits "Resource".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/extend_engine_singleton.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot inherit native class "Time" because it is an engine singleton.
+>> ERROR at line 3: Cannot inherit native class "Time" because it is an engine singleton.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_1.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Constant "A" is not a preloaded script or class.
+>> ERROR at line 5: Constant "A" is not a preloaded script or class.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/extend_non_class_constant_2.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Identifier "X" is not a preloaded script or class.
+>> ERROR at line 8: Identifier "X" is not a preloaded script or class.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/extend_non_gdscript_nested.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot get nested types for extension from non-GDScript type "RefCounted".
+>> ERROR at line 1: Cannot get nested types for extension from non-GDScript type "RefCounted".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/extend_unknown.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Could not find nested type "Baz".
+>> ERROR at line 4: Could not find nested type "Baz".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/extend_variable.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot use variable "A" in extends chain.
+>> ERROR at line 5: Cannot use variable "A" in extends chain.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_float.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "float" so it can't be of type "String".
+>> ERROR at line 5: Expression is of type "float" so it can't be of type "String".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_constant_int.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "int" so it can't be of type "String".
+>> ERROR at line 5: Expression is of type "int" so it can't be of type "String".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_enum_value.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "int" so it can't be of type "String".
+>> ERROR at line 5: Expression is of type "int" so it can't be of type "String".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_float.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "float" so it can't be of type "String".
+>> ERROR at line 5: Expression is of type "float" so it can't be of type "String".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_int.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "int" so it can't be of type "String".
+>> ERROR at line 5: Expression is of type "int" so it can't be of type "String".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_iterator.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "StringName" so it can't be of type "int".
+>> ERROR at line 13: Expression is of type "StringName" so it can't be of type "int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_hard_string.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "String" so it can't be of type "int".
+>> ERROR at line 5: Expression is of type "String" so it can't be of type "int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_bool.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Unable to iterate on value of type "bool".
+>> ERROR at line 2: Unable to iterate on value of type "bool".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_on_literal_int.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Expression is of type "int" so it can't be of type "String".
+>> ERROR at line 3: Expression is of type "int" so it can't be of type "String".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Unable to iterate on value of type "Array[Resource]" with variable of type "Node".
+>> ERROR at line 3: Unable to iterate on value of type "Array[Resource]" with variable of type "Node".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_array.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot include a value of type "int" as "String".
+>> ERROR at line 4: Cannot include a value of type "int" as "String".
+>> ERROR at line 4: Cannot have an element of type "int" in an array of type "Array[String]".

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/for_loop_wrong_specified_type_with_literal_dictionary.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot include a value of type "String" as "int".
+>> ERROR at line 2: Cannot include a value of type "String" as "int".
+>> ERROR at line 2: Cannot have a key of type "String" in a dictionary of type "Dictionary[int, Variant]".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_less.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "my_function(int) -> int".
+>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int) -> int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_count_more.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "my_function(int) -> int".
+>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int) -> int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_default_values.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "my_function(int = <default>) -> int".
+>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int = <default>) -> int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_parameter_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "my_function(int) -> int".
+>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function(int) -> int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_dont_match_parent_signature_return_type.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "my_function() -> int".
+>> ERROR at line 9: The function signature doesn't match the parent. Parent signature is "my_function() -> int".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_1.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f(Object) -> Variant".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f(Object) -> Variant".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_2.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f(Variant) -> Variant".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f(Variant) -> Variant".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_param_type_invalid_contravariance_3.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f(int) -> Variant".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f(int) -> Variant".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_1.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f() -> Node".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> Node".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_2.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f() -> Node".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> Node".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_3.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f() -> Node".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> Node".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_return_type_invalid_covariance_4.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-The function signature doesn't match the parent. Parent signature is "f() -> float".
+>> ERROR at line 6: The function signature doesn't match the parent. Parent signature is "f() -> float".

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/function_used_as_property.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot assign a new value to a constant.
+>> ERROR at line 6: Cannot assign a new value to a constant.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/gd_utility_function_wrong_arg.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid argument for "len()" function: Value of type 'Color' can't provide a length.
+>> ERROR at line 2: Invalid argument for "len()" function: Value of type 'Color' can't provide a length.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_in_static_function.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot use shorthand "get_node()" notation ("$") in a static function.
+>> ERROR at line 6: Cannot use shorthand "get_node()" notation ("$") in a static function.

+ 2 - 1
modules/gdscript/tests/scripts/analyzer/errors/get_node_shorthand_within_non_node.out

@@ -1,2 +1,3 @@
 GDTEST_ANALYZER_ERROR
-Cannot use shorthand "get_node()" notation ("$") on a class that isn't a node.
+>> ERROR at line 4: Cannot use shorthand "get_node()" notation ("$") on a class that isn't a node.
+>> ERROR at line 4: Cannot infer the type of "nope" variable because the value doesn't have a set type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/incompatible_assignment.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Invalid operands "bool" and "String" for assignment operator.
+>> ERROR at line 3: Invalid operands "bool" and "String" for assignment operator.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_local_variable.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot infer the type of "inferred" variable because the value doesn't have a set type.
+>> ERROR at line 3: Cannot infer the type of "inferred" variable because the value doesn't have a set type.

+ 1 - 1
modules/gdscript/tests/scripts/analyzer/errors/inferring_with_weak_type_member_variable.out

@@ -1,2 +1,2 @@
 GDTEST_ANALYZER_ERROR
-Cannot infer the type of "inferred" variable because the value doesn't have a set type.
+>> ERROR at line 2: Cannot infer the type of "inferred" variable because the value doesn't have a set type.

Some files were not shown because too many files changed in this diff