MikeSchulze / gdUnit3

A Godot Unit Test Framework. Support for gdScript and c# unit testing
MIT License
312 stars 22 forks source link

GD-358: Using strings as paramterized test arguments are distorted #358

Closed MikeSchulze closed 1 year ago

MikeSchulze commented 1 year ago

The used Godot version: v3.5.1.stable.official [6fed1ffa3]

OS including version: all

Describe the bug I want to compare a string value agains an expected via parameterized test. The test are failing because the string values from the arguments `test_parameters = ["a test message"]' are distorted by removed all spaces,

image

Steps to Reproduce

func test_with_string_paramset(
    value : Array,
    expected : String,
    test_parameters : Array = [
        [ ["a"], "a" ],
        [ ["a", "very", "long", "argument"], "a very long argument" ],
    ]
):
    assert_that(" ".join(value)).is_equal(expected)

Minimal reproduction project: