Files
moxa/stdlib/go1_14_net_http_httptest.go
Nicholas Wiersma 913680d1ed feat: add call expression (not builtin) type checking
This adds type checking to CallExpr (excluding builtin type checking, as that is a PR in its own right) as well as handling any required constant type conversion.

This also changes constant strings and runes to be represented as `constant.Value`. Runes change `rval` type at CFG typing time to avoid having to type at AST time. There are also changes to importSpecs and `stdlib` to account for the string change. With this all `untyped` types should now be `constant.Value`s, although errors are still not returned if this is not the case to be sure we do not break things.

This also fixed a bug in `itype.methods` that would panic if the type was recursive.
2020-08-14 12:02:04 +02:00

29 lines
911 B
Go

// Code generated by 'github.com/containous/yaegi/extract net/http/httptest'. DO NOT EDIT.
// +build go1.14,!go1.15
package stdlib
import (
"go/constant"
"go/token"
"net/http/httptest"
"reflect"
)
func init() {
Symbols["net/http/httptest"] = map[string]reflect.Value{
// function, constant and variable definitions
"DefaultRemoteAddr": reflect.ValueOf(constant.MakeFromLiteral("\"1.2.3.4\"", token.STRING, 0)),
"NewRecorder": reflect.ValueOf(httptest.NewRecorder),
"NewRequest": reflect.ValueOf(httptest.NewRequest),
"NewServer": reflect.ValueOf(httptest.NewServer),
"NewTLSServer": reflect.ValueOf(httptest.NewTLSServer),
"NewUnstartedServer": reflect.ValueOf(httptest.NewUnstartedServer),
// type definitions
"ResponseRecorder": reflect.ValueOf((*httptest.ResponseRecorder)(nil)),
"Server": reflect.ValueOf((*httptest.Server)(nil)),
}
}