Atlas › Test

empty_quoted_string#01

Exact test identity: go.temporal.io/server/common/sqlquery/TestExtractStringValue/empty_quoted_string#01

Package
go.temporal.io/server/common/sqlquery
Suite / test hierarchy
TestExtractStringValue/empty_quoted_string#01
Test
empty_quoted_string#01
Introduced at
query.go ×1 Frontier kind: Joint frontier
Covered ranges
2
Covered lines
4
Covered files
1

Co-introduced tests

3 other tests enter at the same concept.

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/common/sqlquery/query.go 4 covered LOC · 2 ranges

Open complete file

33 }
34
35 > func ExtractStringValue(s string) (string, error) { query.go
36 > if len(s) >= 2 && s[0] == '\'' && s[len(s)-1] == '\'' {
37 > return s[1 : len(s)-1], nil query.go
38 > }
39 return "", fmt.Errorf("value %s is not a string value", s)
40 }