Automated g4 rollback of changelist 19916.

*** Reason for rollback ***

broke build

*** Original change description ***

utf8: add InString routines for decoding in strings
reflect: add InterfaceValue.Get(), remove Empty
strconv: add Quote, CanBackquote
fmt:
	* %q go-quoted " string
	* %#q go-quoted ` string if possible, " string otherwise
	* %x hexadecimal string
	* anywhere a string is okay, *[]byte is okay
	* flags # 0 - + space
	* print value inside interface, not interface itself
	* tests

TBR=r
OCL=19920
CL=19920
This commit is contained in:
Russ Cox 2008-11-24 13:24:15 -08:00
parent b65a930453
commit 85fea81d70
14 changed files with 158 additions and 636 deletions

View file

@ -283,14 +283,3 @@ export func TestAll(tt *testing.T) { // TODO(r): wrap up better
println(a[i]);
}
}
export func TestInterfaceGet(t *testing.T) {
var inter struct { e interface{ } };
inter.e = 123.456;
v1 := reflect.NewValue(&inter);
v2 := v1.(reflect.PtrValue).Sub().(reflect.StructValue).Field(0);
assert(v2.Type().String(), "interface { }");
i2 := v2.(reflect.InterfaceValue).Get();
v3 := reflect.NewValue(i2);
assert(v3.Type().String(), "float");
}