| 1 | // Copyright IBM Corp. 2020, 2025 |
| 2 | // SPDX-License-Identifier: MPL-2.0 |
| 3 | |
| 4 | package uuidscip-go gomod github.com/hashicorp/go-cty-funcs . `github.com/hashicorp/go-cty-funcs/uuid`/ |
| 5 | |
| 6 | import ( |
| 7 | "testingscip-go gomod github.com/golang/go/src go1.24.0 testing/" |
| 8 | ) |
| 9 | |
| 10 | func TestV4scip-go gomod github.com/hashicorp/go-cty-funcs . `github.com/hashicorp/go-cty-funcs/uuid`/TestV4().(t *testingscip-go gomod github.com/golang/go/src go1.24.0 testing/.Tscip-go gomod github.com/golang/go/src go1.24.0 testing/T#) { |
| 11 | result, err := V4scip-go gomod github.com/hashicorp/go-cty-funcs . `github.com/hashicorp/go-cty-funcs/uuid`/V4().() |
| 12 | if err != nil { |
| 13 | t.Fatalscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Fatal().(err) |
| 14 | } |
| 15 | |
| 16 | resultStr := result.AsStringscip-go gomod github.com/zclconf/go-cty v1.17.0 `github.com/zclconf/go-cty/cty`/Value#AsString().() |
| 17 | if got, want := len(resultStr), 36; got != want { |
| 18 | t.Errorfscip-go gomod github.com/golang/go/src go1.24.0 testing/common#Errorf().("wrong result length %d; want %d", got, want) |
| 19 | } |
| 20 | } |