Commit 3f2b0fdc authored by Boris Mühmer's avatar Boris Mühmer
Browse files

added type assignment test

parent f2da20a8
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -23,3 +23,17 @@ func TestDynamicTypes(t *testing.T) {
		}
	}
}

func getValue() interface{} {
	return 3 //.1415926
}

func TestAssignment(t *testing.T) {
	v := getValue()
	a, ok := v.(int)
	if ok == false {
		t.Logf("failed to convert")
	} else {
		t.Logf("%d", a)
	}
}