Skip to content

Not getting "code run" cleanly if test function has multi-line parameters #16

@glennj

Description

@glennj

For example, the first two-bucket test is

@(test)
/// description = Measure using bucket one of size 3 and bucket two of size 5 - start with bucket one
test_measure_using_bucket_one_of_size_3_and_bucket_two_of_size_5___start_with_bucket_one :: proc(
	t: ^testing.T,
) {

	result, valid := measure(bucket_one = 3, bucket_two = 5, goal = 1, start_bucket = "one")

	testing.expect_value(t, valid, true)
	testing.expect_value(t, result.moves, 4)
	testing.expect_value(t, result.goal_bucket, "one")
	testing.expect_value(t, result.other_bucket, 5)
}

But in the web ui, the code run box contains

t: ^testing.T,
) {
result, valid := measure(bucket_one = 3, bucket_two = 5, goal = 1, start_bucket = "one")
testing.expect_value(t, valid, true)
testing.expect_value(t, result.moves, 4)
testing.expect_value(t, result.goal_bucket, "one")
testing.expect_value(t, result.other_bucket, 5)

Need to start capturing on the line after the proc's open brace, not the line after the proc name.

Image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions