File: prop_arg_test.go

package info (click to toggle)
golang-github-leanovate-gopter 0.2.9%2Bgit20210201.bbbf00e-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 696 kB
  • sloc: makefile: 37
file content (19 lines) | stat: -rw-r--r-- 472 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package gopter_test

import (
	"testing"

	"github.com/leanovate/gopter"
)

func TestPropArg(t *testing.T) {
	gen := constGen("nothing").WithLabel("Label1").WithLabel("Label2")
	prop := gopter.NewPropArg(gen(gopter.DefaultGenParameters()), 1, "nothing", "nothing", "nothing", "nothing")

	if prop.Label != "Label1, Label2" {
		t.Errorf("Invalid prop.Label: %#v", prop.Label)
	}
	if prop.String() != "nothing" {
		t.Errorf("Invalid prop.Stirng(): %#v", prop.String())
	}
}