summaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)AuthorFilesLines
2008-11-19- full support for sorting (assumes array elements implement LessInterfaceRobert Griesemer2-19/+43
- better test reporting R=r DELTA=43 (24 added, 0 deleted, 19 changed) OCL=19641 CL=19645
2008-11-19gotestify & gostylify math.Russ Cox17-200/+385
R=r DELTA=682 (275 added, 301 deleted, 106 changed) OCL=19638 CL=19642
2008-11-19gotestify regexpRob Pike2-42/+70
R=rsc DELTA=101 (53 added, 25 deleted, 23 changed) OCL=19635 CL=19637
2008-11-19use new test framework in array testRobert Griesemer1-28/+25
R=r DELTA=30 (2 added, 5 deleted, 23 changed) OCL=19627 CL=19632
2008-11-19- removed uses of vector in favor of array in a few placesRobert Griesemer2-17/+15
- fixed make.bash R=r DELTA=21 (1 added, 3 deleted, 17 changed) OCL=19624 CL=19629
2008-11-19add a type testing.T and use it in tests.Rob Pike7-160/+182
update uses of gotest. minor tweak to testing structure for protobuf. R=rsc DELTA=276 (71 added, 75 deleted, 130 changed) OCL=19614 CL=19621
2008-11-19- adjust sort.go to use new naming conventionsRobert Griesemer1-28/+28
R=rsc DELTA=31 (0 added, 0 deleted, 31 changed) OCL=19618 CL=19620
2008-11-19new Makefile generated by gobuildRobert Griesemer1-2/+9
R=rsc DELTA=9 (7 added, 0 deleted, 2 changed) OCL=19613 CL=19613
2008-11-19- array lib (essentially vector, more complete)Robert Griesemer5-1/+320
- TODO replace vector R=r DELTA=314 (313 added, 0 deleted, 1 changed) OCL=19592 CL=19609
2008-11-19gobuild: add coverage rule, ignore files in package main.Russ Cox8-14/+35
R=r DELTA=55 (41 added, 11 deleted, 3 changed) OCL=19594 CL=19598
2008-11-19essentially 100% coverage of strconv in tests.Russ Cox9-23/+297
fix a few bugs. R=r DELTA=294 (275 added, 9 deleted, 10 changed) OCL=19595 CL=19595
2008-11-19gotest, via testing.go, should warn you if you failed to create any tests.Rob Pike1-0/+5
when chatty, it should tell you how many there are. R=rsc DELTA=5 (5 added, 0 deleted, 0 changed) OCL=19590 CL=19590
2008-11-19saving 2 lines :-)Robert Griesemer1-5/+3
R=rsc DELTA=5 (0 added, 2 deleted, 3 changed) OCL=19562 CL=19585
2008-11-19leave 6.out around after gotest;Russ Cox8-8/+8
delete it in make clean. R=r DELTA=10 (0 added, 0 deleted, 10 changed) OCL=19542 CL=19581
2008-11-18read and write never return -1 now: error return is through the error ↵Rob Pike1-4/+13
variable only R=rsc DELTA=13 (9 added, 0 deleted, 4 changed) OCL=19538 CL=19570
2008-11-18perm is [] instead of mapKen Thompson1-3/+3
R=r OCL=19569 CL=19569
2008-11-18make Copyn take and return int64.Russ Cox1-15/+51
add Copy. R=gri DELTA=52 (37 added, 1 deleted, 14 changed) OCL=19557 CL=19559
2008-11-18CopynRobert Griesemer1-0/+34
R=rsc DELTA=34 (34 added, 0 deleted, 0 changed) OCL=19541 CL=19545
2008-11-18add -chatty flag to test.Russ Cox1-5/+19
was supposed to be in some other cl but got dropped. R=r DELTA=21 (16 added, 2 deleted, 3 changed) OCL=19531 CL=19539
2008-11-18stop flag reading before lone - arg.Russ Cox1-2/+5
R=r DELTA=5 (3 added, 0 deleted, 2 changed) OCL=19520 CL=19529
2008-11-18more tests for strconv; convert to gotest.Russ Cox3-39/+190
R=r DELTA=219 (186 added, 32 deleted, 1 changed) OCL=19508 CL=19523
2008-11-18return *os.Error instead of bool from strconv.ato*Russ Cox2-50/+100
R=r DELTA=137 (56 added, 4 deleted, 77 changed) OCL=19505 CL=19522
2008-11-18gobuild changes.Russ Cox8-117/+214
* handles multiple packages per directory * scans directory for files if given no arguments * infers package name * includes test rule invoking gotest R=r DELTA=746 (444 added, 150 deleted, 152 changed) OCL=19504 CL=19521
2008-11-18roll tests into one binaryRuss Cox5-118/+122
R=r DELTA=145 (27 added, 27 deleted, 91 changed) OCL=19423 CL=19502
2008-11-18testing support libraryRob Pike1-0/+26
R=rsc OCL=19496 CL=19496
2008-11-18new gotest shell script (will be a proper command some day, probably)Rob Pike1-0/+1
automates construction and execution of unit tests. R=rsc DELTA=60 (58 added, 0 deleted, 2 changed) OCL=19482 CL=19484
2008-11-17* faster atof for common casesRuss Cox2-14/+214
(gets 3x speedup in go; got 40x in c) * handle and test overflow R=r DELTA=217 (200 added, 0 deleted, 17 changed) OCL=19399 CL=19422
2008-11-17correctly rounded floating-point conversionsRuss Cox20-502/+1782
in new package strconv. move atoi etc to strconv too. update fmt, etc to use strconv. R=r DELTA=2232 (1691 added, 424 deleted, 117 changed) OCL=19286 CL=19380
2008-11-17adopt suggestions from Bentley and McIlroy (SP&E Nov 1993)Russ Cox1-29/+98
to make qsort more robust: * use "ninther" to choose pivot. * use three-way partition to avoid quadratic behavior on all-one-value arrays. also add tests suggested in that paper. the immediate cause of the slowness we observed was in fact none of these: the recursive call was sorting data[0:m] instead of data[a:m]. also rename package to "sort" to match convention. R=r,gri DELTA=358 (255 added, 21 deleted, 82 changed) OCL=19341 CL=19373
2008-11-16random permutation functionKen Thompson1-0/+17
func perm(n int) *map[int]int R=r OCL=19340 CL=19340
2008-11-14buf fix: make FD.Read, FD.Write work for empty buffersRobert Griesemer1-2/+8
R=r DELTA=8 (6 added, 0 deleted, 2 changed) OCL=19273 CL=19275
2008-11-14clean up make scriptRob Pike1-44/+47
reorder pieces so io is earlier R=rsc DELTA=66 (27 added, 24 deleted, 15 changed) OCL=19248 CL=19255
2008-11-14- added Init() function so that vectors can be used w/o New():Robert Griesemer1-7/+11
var v Vector.Vector; v.Init(); ... - clear vector elements in Reset - removed some comments that seem redundant R=r DELTA=16 (9 added, 5 deleted, 2 changed) OCL=19247 CL=19247
2008-11-14add cov, prof to default build; clean up compiler warningsRuss Cox1-1/+1
R=r DELTA=8 (1 added, 0 deleted, 7 changed) OCL=19245 CL=19245
2008-11-14handle nils safelyRob Pike1-22/+26
R=rsc DELTA=38 (14 added, 10 deleted, 14 changed) OCL=19242 CL=19242
2008-11-13add a %v format to print an arbitrary value in its "println" form.Rob Pike1-38/+75
also add code to print (pointers to) arrays, through %v. R=rsc DELTA=108 (70 added, 33 deleted, 5 changed) OCL=19184 CL=19192
2008-11-13more array methodsRuss Cox4-58/+139
R=r OCL=19172 CL=19172
2008-11-13* 6l:Russ Cox1-3/+9
if an object in an archive tries to refer to a file in its original source directory, ignore it. * 6ar: fix bug if archive is empty. * gobuild: build archive in current directory. * math: use new gobuild Makefile. * test/math.go: rename to mathest.go, add // run line, make it run. R=r DELTA=494 (277 added, 203 deleted, 14 changed) OCL=19090 CL=19171
2008-11-12add some support for modifying what pointers point toRob Pike2-11/+16
R=rsc DELTA=27 (16 added, 11 deleted, 0 changed) OCL=19130 CL=19132
2008-11-12fix bug in FullyReaderRob Pike1-1/+1
R=rsc DELTA=1 (0 added, 0 deleted, 1 changed) OCL=19131 CL=19131
2008-11-12reflect.PtrValue.SetSub() to set pointersRob Pike2-0/+21
R=rsc OCL=19101 CL=19101
2008-11-12- lowercased package name (Bignum -> bignum)Robert Griesemer1-8/+23
- implemented some missing functionality (and, or, xor of positive ints) R=r OCL=19087 CL=19087
2008-11-11Implement a "full reader" wrapper for io.Read, guaranteeing thatRob Pike1-2/+44
either the buffer is full, zero bytes were read, or an error is returned. R=rsc DELTA=44 (42 added, 0 deleted, 2 changed) OCL=19027 CL=19047
2008-11-10Add a cache to avoid unnecessary parsing of type strings when constructing ↵Rob Pike1-2/+11
values R=rsc DELTA=12 (9 added, 0 deleted, 3 changed) OCL=18916 CL=18921
2008-11-10Protocol buffer encoding.Rob Pike1-2/+2
R=rsc DELTA=1075 (1028 added, 31 deleted, 16 changed) OCL=18865 CL=18918
2008-11-07Added missing Set method for VectorRobert Griesemer1-0/+6
BUG=1474670 TBR=r DELTA=6 (6 added, 0 deleted, 0 changed) OCL=18839 CL=18843
2008-11-07wrong system call number for statRob Pike1-1/+1
TBR=rsc OCL=18833 CL=18833
2008-11-06- binomial implementation (fixing broken build)Robert Griesemer1-0/+5
R=r OCL=18738 CL=18738
2008-11-06simpleminded ascii to floating point conversionRob Pike2-3/+105
R=rsc DELTA=111 (107 added, 0 deleted, 4 changed) OCL=18720 CL=18725
2008-11-06- implemented String() and Format functionality in BignumRobert Griesemer1-6/+50
- added a test R=r OCL=18687 CL=18687