Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GD-150: Use Create Test results in wrong indent testsuite errors #150

Closed
MikeSchulze opened this issue Mar 21, 2023 · 0 comments · Fixed by #151
Closed

GD-150: Use Create Test results in wrong indent testsuite errors #150

MikeSchulze opened this issue Mar 21, 2023 · 0 comments · Fixed by #151
Assignees
Labels
blocker This issue blocks the user to use GdUnit bug Something isn't working
Milestone

Comments

@MikeSchulze
Copy link
Owner

MikeSchulze commented Mar 21, 2023

The used GdUnit4 version:
GdUnit4 v4.1.0

The used Godot version:
v4.0.stable.official [92bee43ad]

OS including version:
All

Describe the bug
Creating a new test on a fresh installed GdUnit4 resuls in an error
res://test/FoosTest.gd:3 - Parse Error: Unexpected "Indent" in class body.

Steps to Reproduce

  • create simpe script
  • use the context menu to create a new test Create Test

The generated testsuite has a wrong indent

	# GdUnit generated TestSuite
	class_name FooTest
	extends GdUnitTestSuite
	@warning_ignore('unused_parameter')
	@warning_ignore('return_value_discarded')
	
	# TestSuite generated from
	const __source = 'res://src/Foo.gd'


func test_dispose() -> void:
	# remove this line and complete your test
	assert_not_yet_implemented()

Workaround

Go to GdUnit settings on Templates tab and press the Restore button

Minimal reproduction project:

@MikeSchulze MikeSchulze added bug Something isn't working blocker This issue blocks the user to use GdUnit labels Mar 21, 2023
@MikeSchulze MikeSchulze added this to the V4.1.0 milestone Mar 21, 2023
@MikeSchulze MikeSchulze self-assigned this Mar 21, 2023
@MikeSchulze MikeSchulze changed the title Use 'Create Test' results in wrong indent testsuite erros GD-150: Use 'Create Test' results in wrong indent testsuite erros Mar 21, 2023
@MikeSchulze MikeSchulze changed the title GD-150: Use 'Create Test' results in wrong indent testsuite erros GD-150: Use Create Test results in wrong indent testsuite errors Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker This issue blocks the user to use GdUnit bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant