this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/tdtest: mimic replacement of testing.Run in Select

This allows the select string to be the same as the subtest name.

This is only an approximation, as testing.T.Run does more
rewriting.

Signed-off-by: Marcel van Lohuizen <mpvl@gmail.com>
Change-Id: I36290242264d831b788fe9a5975210f5c1e4ba41
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1167817
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>

+1 -3
+1 -3
internal/tdtest/tdtest.go
··· 40 40 // - make name field explicit, i.e. Name("name"), field tag, or tdtest.Name type. 41 41 // - allow "skip" field. Again either SkipName("skip"), tag, or Skip type. 42 42 // - allow for tdtest:"noupdate" field tag. 43 - // - should we derive names from field names? This would require always 44 - // loading the packages data upon error. Could be an option to disable, or 45 - // implicitly it would only be loaded if there is an error without message. 46 43 // - Option: allow ignore field that lists a set of fields to not be tested 47 44 // for that particular test case: ignore: tdtest.Ignore("want1", "want2") 48 45 // ··· 165 162 return 166 163 } 167 164 case string: 165 + n = strings.ReplaceAll(n, " ", "_") 168 166 if n == parts[len(parts)-1] { 169 167 return 170 168 }