summaryrefslogtreecommitdiff
path: root/src/pkg/gob/encoder_test.go
AgeCommit message (Collapse)AuthorFilesLines
2012-04-06Imported Upstream version 1upstream/1Ondřej Surý1-580/+0
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý1-0/+580
2011-09-13Imported Upstream version 60Ondřej Surý1-551/+0
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-2/+37
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-1/+1
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý1-0/+18
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý1-1/+71
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý1-9/+52
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý1-73/+132
2010-06-28gob: allow transmission of things other than structs at the top level.Rob Pike1-8/+57
also fix a bug handling nil maps: before, would needlessly send empty map R=rsc CC=golang-dev http://codereview.appspot.com/1739043
2009-12-31trivial bug: []byte is special but [3]byte is not.Rob Pike1-1/+2
modify a test to verify the fix. R=rsc CC=golang-dev http://codereview.appspot.com/183090 Committer: Rob Pike <r@golang.org>
2009-12-29fix dumb bug: must write out default values inside arrays and slicesRob Pike1-0/+20
Fixes issue 459. R=rsc, imkrasin, sonia CC=golang-dev http://codereview.appspot.com/181073
2009-12-151) Change default gofmt default settings forRobert Griesemer1-82/+82
parsing and printing to new syntax. Use -oldparser to parse the old syntax, use -oldprinter to print the old syntax. 2) Change default gofmt formatting settings to use tabs for indentation only and to use spaces for alignment. This will make the code alignment insensitive to an editor's tabwidth. Use -spaces=false to use tabs for alignment. 3) Manually changed src/exp/parser/parser_test.go so that it doesn't try to parse the parser's source files using the old syntax (they have new syntax now). 4) gofmt -w src misc test/bench 3rd set of files. R=rsc CC=golang-dev http://codereview.appspot.com/180048
2009-12-02test that arrays work properly.Rob Pike1-4/+22
can't mix slices and arrays now; perhaps that should be a TODO R=rsc http://codereview.appspot.com/164079
2009-12-01explicitly catch attempt to decode into a value - must be a pointer to see ↵Rob Pike1-2/+13
the result. R=rsc http://codereview.appspot.com/163070
2009-12-01more gob bugsRob Pike1-0/+12
1) need to send slice and array types (was only sending element types) 2) compatibleType needs to use decoder's type map R=rsc CC=golang-dev http://codereview.appspot.com/164062
2009-11-16Rework gobs to fix bad bug related to sharing of id's between encoder and ↵Rob Pike1-114/+2
decoder side. Fix is to move all decoder state into the decoder object. Fixes issue 215. R=rsc CC=golang-dev http://codereview.appspot.com/155077
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer1-40/+40
R=rsc, r http://go/go-review/1025029
2009-11-05gofmt-ify gobRobert Griesemer1-31/+37
(the one-line struct types used in composite literals will become one line again in another cleanup round; don't worry about them now) R=r http://go/go-review/1016056
2009-10-11fix bugs in gob.Rob Pike1-0/+56
1) didn't handle attempts to encode non-structs properly. 2) if there were multiple indirections involving allocation, didn't allocate the intermediate cells. tests added. R=rsc DELTA=82 (65 added, 5 deleted, 12 changed) OCL=35582 CL=35582
2009-09-21move strings.Buffer into bytesRob Pike1-2/+1
delete strings.Buffer add a test for a bug not caught before (mustn't install zero-length blocks) R=rsc DELTA=987 (289 added, 587 deleted, 111 changed) OCL=34850 CL=34850
2009-09-21step 2 of the great buffer shift.Rob Pike1-1/+1
make strings.Buffer handle strings and bytes with comparable efficiency. if ok, next step will be to move this code to bytes.Buffer and terminate strings.Buffer's short happy life. R=rsc DELTA=292 (212 added, 0 deleted, 80 changed) OCL=34837 CL=34849
2009-09-17use buf.String() instead of string(buf.Bytes())Rob Pike1-1/+1
use strings.Buffer instead of bytes.Buffer in some places R=rsc DELTA=40 (0 added, 3 deleted, 37 changed) OCL=34770 CL=34775
2009-09-17unused importsRuss Cox1-1/+0
R=r OCL=34731 CL=34731
2009-08-30can't encode array or slice - catch in sendType rather than failing in EncodeRob Pike1-0/+22
R=rsc DELTA=38 (33 added, 3 deleted, 2 changed) OCL=34101 CL=34104
2009-08-12convert gob to whole-package compilation.Russ Cox1-1/+0
had to reorder some init code. R=r DELTA=136 (15 added, 110 deleted, 11 changed) OCL=33071 CL=33102
2009-07-29handle unsupported types safely.Rob Pike1-3/+3
R=rsc DELTA=154 (71 added, 6 deleted, 77 changed) OCL=32483 CL=32492
2009-07-29clean up EOFRob Pike1-1/+1
R=rsc DELTA=5 (0 added, 1 deleted, 4 changed) OCL=32465 CL=32467
2009-07-29handle some error conditions involving bad data.Rob Pike1-0/+17
R=rsc DELTA=32 (24 added, 1 deleted, 7 changed) OCL=32461 CL=32463
2009-07-28change the encoding of uints to simplify overflow checking and to make themRob Pike1-2/+1
easier and faster to read. they are now either a one-byte value or a n-byte value preceded by a byte holding -n. R=rsc DELTA=150 (45 added, 7 deleted, 98 changed) OCL=32381 CL=32387
2009-07-27clean up for public use: make some stuff private, add doc comments.Rob Pike1-3/+3
R=rsc DELTA=298 (202 added, 0 deleted, 96 changed) OCL=32006 CL=32224
2009-07-17ignore missing structsRob Pike1-12/+10
R=rsc DELTA=113 (74 added, 14 deleted, 25 changed) OCL=31776 CL=31776
2009-07-16clean up the code, flow errors out to decoder.Rob Pike1-5/+3
R=rsc DELTA=99 (32 added, 22 deleted, 45 changed) OCL=31759 CL=31759
2009-07-16- allow wire type and receive type to differ.Rob Pike1-4/+5
- still TODO: ignoring struct fields. R=rsc DELTA=309 (240 added, 2 deleted, 67 changed) OCL=31750 CL=31750
2009-07-16clean up the decode loop and fix a couple of bad printsRob Pike1-3/+3
R=rsc DELTA=15 (8 added, 2 deleted, 5 changed) OCL=31738 CL=31738
2009-07-15make the low-level encoder and decoder private and have them access ↵Rob Pike1-15/+35
byte.Buffers rather than io.Readers and io.Writers. change the Encoder/Decoder protocol so that each message is preceded by its length in bytes. R=rsc DELTA=468 (119 added, 23 deleted, 326 changed) OCL=31700 CL=31702
2009-07-13the name of the type was being sent twice. drop the outer instance.Rob Pike1-2/+2
R=rsc DELTA=10 (5 added, 1 deleted, 4 changed) OCL=31523 CL=31526
2009-07-11first cut at gob decoder.Rob Pike1-1/+96
R=rsc DELTA=184 (181 added, 1 deleted, 2 changed) OCL=31474 CL=31486
2009-07-10one more piece of testing: 2nd send should not send type info.Rob Pike1-0/+25
R=rsc DELTA=25 (25 added, 0 deleted, 0 changed) OCL=31460 CL=31460
2009-07-10a better encoder test, with a couple of fixes for bugs it uncovered.Rob Pike1-0/+56
R=rsc DELTA=84 (65 added, 9 deleted, 10 changed) OCL=31458 CL=31458
2009-07-09store ids rather than Types in the structs so they can be encoded.Rob Pike1-0/+37
change Type to gobType. fix some bugs around recursive structures. lots of cleanup. add the first cut at a type encoder. R=rsc DELTA=400 (287 added, 11 deleted, 102 changed) OCL=31401 CL=31406