-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests-go.txt
964 lines (667 loc) · 28.8 KB
/
run-tests-go.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
Running automated test file(s):
Go packages: sorting
===============================================================================
Running: ../../.github/citools/go/go-lint-golangci-lint
Running GoLangCi-Lint
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.033s
user 0m0.022s
sys 0m0.037s
==============================================================================
Running: golangci-lint run --enable-all ./...
level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref."
level=warning msg="[runner] The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming)."
level=warning msg="[runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner. "
level=warning msg="[runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'."
level=warning msg="[runner] The linter 'exhaustivestruct' is deprecated (since v1.46.0) due to: The owner seems to have abandoned the linter. Replaced by exhaustruct."
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive."
level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
sorting_room.go:45:2: singleCaseSwitch: should rewrite switch statement to if statement (gocritic)
switch t := fnb.(type) {
^
sorting_room.go:61:8: var-declaration: should omit type float64 from declaration of var f; it will be inferred from the right-hand side (revive)
var f float64 = float64(ExtractFancyNumber(fnb))
^
sorting_room_test.go:34:29: Using the variable on range scope `test` in function literal (scopelint)
if got := DescribeNumber(test.input); got != test.want {
^
sorting_room_test.go:35:50: Using the variable on range scope `test` in function literal (scopelint)
t.Errorf("DescribeNumber(%v) = %v; want %v", test.input, got, test.want)
^
sorting_room_test.go:68:32: Using the variable on range scope `test` in function literal (scopelint)
if got := DescribeNumberBox(test.input); got != test.want {
^
sorting_room.go:11:2: return with no blank line before (nlreturn)
return fmt.Sprintf("%s %.1f", str, f)
^
sorting_room.go:22:2: return with no blank line before (nlreturn)
return fmt.Sprintf("%s %.1f", str, float64(nb.Number()))
^
sorting_room_test.go:5:1: Function TestDescribeNumber missing the call to method parallel (paralleltest)
func TestDescribeNumber(t *testing.T) {
^
sorting_room_test.go:32:2: Range statement for test TestDescribeNumber missing the call to method parallel in test Run (paralleltest)
for _, test := range tests {
^
sorting_room_test.go:49:1: Function TestDescribeNumberBox missing the call to method parallel (paralleltest)
func TestDescribeNumberBox(t *testing.T) {
^
sorting_room_test.go:66:2: Range statement for test TestDescribeNumberBox missing the call to method parallel in test Run (paralleltest)
for _, test := range tests {
^
sorting_room_test.go:83:1: Function TestExtractFancyNumber missing the call to method parallel (paralleltest)
func TestExtractFancyNumber(t *testing.T) {
^
sorting_room_test.go:110:2: Range statement for test TestExtractFancyNumber missing the call to method parallel in test Run (paralleltest)
for _, test := range tests {
^
sorting_room_test.go:119:1: Function TestDescribeFancyNumberBox missing the call to method parallel (paralleltest)
func TestDescribeFancyNumberBox(t *testing.T) {
^
sorting_room_test.go:146:2: Range statement for test TestDescribeFancyNumberBox missing the call to method parallel in test Run (paralleltest)
for _, test := range tests {
^
sorting_room_test.go:155:1: Function TestDescribeAnything missing the call to method parallel (paralleltest)
func TestDescribeAnything(t *testing.T) {
^
sorting_room_test.go:192:2: Range statement for test TestDescribeAnything missing the call to method parallel in test Run (paralleltest)
for _, test := range tests {
^
sorting_room_examples_test.go:1:9: package should be `sorting_test` instead of `sorting` (testpackage)
package sorting
^
sorting_room_test.go:1:9: package should be `sorting_test` instead of `sorting` (testpackage)
package sorting
^
sorting_room.go:50:2: variable name 'i' is too short for the scope of its usage (varnamelen)
i, e := strconv.Atoi(s)
^
sorting_room.go:43:6: variable name 's' is too short for the scope of its usage (varnamelen)
var s string
^
sorting_room.go:68:9: variable name 'v' is too short for the scope of its usage (varnamelen)
switch v := i.(type) {
^
real 0m0.512s
user 0m0.717s
sys 0m0.488s
==============================================================================
Exit code: -1
real 0m0.558s
user 0m0.748s
sys 0m0.533s
real 0m0.560s
user 0m0.748s
sys 0m0.535s
===============================================================================
Running: ../../.github/citools/go/go-lint-revive
Running Go Lint Revive
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.029s
user 0m0.020s
sys 0m0.040s
==============================================================================
Running: revive -formatter=stylish ./...
sorting_room.go
(61, 8) https://revive.run/r#var-declaration should omit type float64 from declaration of var f; it will be inferred from the right-hand side
(1, 1) https://revive.run/r#package-comments should have a package comment
✖ 2 problems (0 errors) (2 warnings)
real 0m0.053s
user 0m0.028s
sys 0m0.043s
==============================================================================
Exit code: 0
real 0m0.092s
user 0m0.050s
sys 0m0.095s
real 0m0.094s
user 0m0.053s
sys 0m0.095s
===============================================================================
Running: ../../.github/citools/go/go-lint-ineffassign
../run-tests: line 41: .github/citools/go/go-lint-ineffassign: No such file or directory
real 0m0.001s
user 0m0.001s
sys 0m0.000s
===============================================================================
Running: ../../.github/citools/go/go-lint-go-consistent
Running Go go-consistent
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.029s
user 0m0.035s
sys 0m0.026s
==============================================================================
Running: go-consistent -v ./...
info: check "./."
internal error: package "fmt" without types was imported from "sorting"
real 0m0.096s
user 0m0.122s
sys 0m0.131s
==============================================================================
Exit code: -1
real 0m0.142s
user 0m0.167s
sys 0m0.169s
real 0m0.144s
user 0m0.168s
sys 0m0.171s
===============================================================================
Running: ../../.github/citools/go/go-lint-staticcheck
Running Go StaticCheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.024s
user 0m0.020s
sys 0m0.027s
==============================================================================
Running: staticcheck -checks=all ./...
sorting_room.go:1:1: at least one file in a package should have a package comment (ST1000)
sorting_room.go:61:8: should omit type float64 from declaration; it will be inferred from the right-hand side (ST1023)
real 0m0.173s
user 0m0.213s
sys 0m0.095s
==============================================================================
Exit code: -1
real 0m0.208s
user 0m0.239s
sys 0m0.130s
real 0m0.210s
user 0m0.241s
sys 0m0.130s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocritic
Running Go gocritic
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.021s
user 0m0.019s
sys 0m0.025s
==============================================================================
Running: gocritic check -enableAll ./...
./sorting_room.go:45:2: singleCaseSwitch: should rewrite switch statement to if statement
real 0m0.869s
user 0m2.173s
sys 0m0.278s
==============================================================================
Exit code: -1
real 0m0.902s
user 0m2.201s
sys 0m0.310s
real 0m0.904s
user 0m2.203s
sys 0m0.310s
===============================================================================
Running: ../../.github/citools/go/go-lint-go_vet
Running Go Vet
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.029s
user 0m0.024s
sys 0m0.032s
==============================================================================
Running: go vet ./...
real 0m0.077s
user 0m0.109s
sys 0m0.111s
==============================================================================
Exit code: 0
real 0m0.118s
user 0m0.143s
sys 0m0.151s
real 0m0.121s
user 0m0.144s
sys 0m0.153s
===============================================================================
Running: ../../.github/citools/go/go-fixer-go_fix
Running go fix
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.025s
user 0m0.019s
sys 0m0.025s
==============================================================================
Running: go fix ./...
real 0m0.025s
user 0m0.018s
sys 0m0.027s
==============================================================================
Exit code: 0
real 0m0.065s
user 0m0.047s
sys 0m0.062s
real 0m0.068s
user 0m0.049s
sys 0m0.064s
===============================================================================
Running: ../../.github/citools/go/go-lint-errcheck
Running Go errcheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.021s
user 0m0.018s
sys 0m0.017s
==============================================================================
Running: errcheck ./...
real 0m0.485s
user 0m1.541s
sys 0m0.315s
==============================================================================
Exit code: 0
real 0m0.518s
user 0m1.563s
sys 0m0.344s
real 0m0.520s
user 0m1.564s
sys 0m0.344s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocyclo
Running Go gocyclo
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.034s
user 0m0.046s
sys 0m0.052s
==============================================================================
Running: gocyclo .
5 sorting DescribeAnything sorting_room.go:67:1
3 sorting TestDescribeAnything sorting_room_test.go:155:1
3 sorting TestDescribeFancyNumberBox sorting_room_test.go:119:1
3 sorting TestExtractFancyNumber sorting_room_test.go:83:1
3 sorting TestDescribeNumberBox sorting_room_test.go:49:1
3 sorting TestDescribeNumber sorting_room_test.go:5:1
3 sorting ExtractFancyNumber sorting_room.go:42:1
1 sorting (differentFancyNumber).Value sorting_room_test.go:79:1
1 sorting (testNumberBox).Number sorting_room_test.go:45:1
1 sorting ExampleDescribeAnything sorting_room_examples_test.go:45:1
1 sorting ExampleDescribeFancyNumberBox sorting_room_examples_test.go:37:1
1 sorting ExampleExtractFancyNumber sorting_room_examples_test.go:29:1
1 sorting ExampleDescribeNumberBox sorting_room_examples_test.go:21:1
1 sorting (exampleNumberBox).Number sorting_room_examples_test.go:17:1
1 sorting ExampleDescribeNumber sorting_room_examples_test.go:7:1
1 sorting DescribeFancyNumberBox sorting_room.go:60:1
1 sorting (FancyNumber).Value sorting_room.go:31:1
1 sorting DescribeNumberBox sorting_room.go:20:1
1 sorting DescribeNumber sorting_room.go:9:1
real 0m0.002s
user 0m0.000s
sys 0m0.002s
==============================================================================
Exit code: 0
real 0m0.048s
user 0m0.053s
sys 0m0.063s
real 0m0.049s
user 0m0.054s
sys 0m0.063s
===============================================================================
Running: ../../.github/citools/go/go-lint-misspell
Running Go misspell
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: misspell .
real 0m0.027s
user 0m0.033s
sys 0m0.008s
==============================================================================
Exit code: 0
real 0m0.037s
user 0m0.038s
sys 0m0.018s
real 0m0.039s
user 0m0.039s
sys 0m0.018s
===============================================================================
Running: ../../.github/citools/go/go-lint-gosec
Running Go GoSec
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.023s
user 0m0.023s
sys 0m0.024s
==============================================================================
Running: gosec ./...
[gosec] 2023/09/07 00:31:06 Including rules: default
[gosec] 2023/09/07 00:31:06 Excluding rules: default
[gosec] 2023/09/07 00:31:06 Import directory: /home/vpayno/git_vpayno/exercism-workspace/go/sorting-room
[gosec] 2023/09/07 00:31:06 Checking package: sorting
[gosec] 2023/09/07 00:31:06 Checking file: /home/vpayno/git_vpayno/exercism-workspace/go/sorting-room/sorting_room.go
Results:
[1;36mSummary:[0m
Gosec : dev
Files : 1
Lines : 80
Nosec : 0
Issues : [1;32m0[0m
real 0m0.126s
user 0m0.159s
sys 0m0.086s
==============================================================================
Exit code: 0
real 0m0.160s
user 0m0.190s
sys 0m0.117s
real 0m0.161s
user 0m0.190s
sys 0m0.118s
===============================================================================
Running: ../../.github/citools/go/go-test-cover-report
Running Go Test, Coverage & Reports
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.021s
user 0m0.019s
sys 0m0.021s
==============================================================================
Running: gotest -v -covermode=count -coverprofile coverage.out ./...
=== RUN TestDescribeNumber
=== RUN TestDescribeNumber/Describe_4.1
=== RUN TestDescribeNumber/Describe_-3.2
=== RUN TestDescribeNumber/Pads_to_single_decimal_place
=== RUN TestDescribeNumber/Truncates_to_single_decimal_place
--- PASS: TestDescribeNumber (0.00s)
--- PASS: TestDescribeNumber/Describe_4.1 (0.00s)
--- PASS: TestDescribeNumber/Describe_-3.2 (0.00s)
--- PASS: TestDescribeNumber/Pads_to_single_decimal_place (0.00s)
--- PASS: TestDescribeNumber/Truncates_to_single_decimal_place (0.00s)
=== RUN TestDescribeNumberBox
=== RUN TestDescribeNumberBox/Describe_NumberBox_with_4
=== RUN TestDescribeNumberBox/Describe_NumberBox_with_-3
--- PASS: TestDescribeNumberBox (0.00s)
--- PASS: TestDescribeNumberBox/Describe_NumberBox_with_4 (0.00s)
--- PASS: TestDescribeNumberBox/Describe_NumberBox_with_-3 (0.00s)
=== RUN TestExtractFancyNumber
=== RUN TestExtractFancyNumber/Extract_fancy_number_11
=== RUN TestExtractFancyNumber/Extract_fancy_number_0
=== RUN TestExtractFancyNumber/Extract_a_differentFancyNumber_returns_0
=== RUN TestExtractFancyNumber/Extract_an_invalid_fancy_number_returns_0
--- PASS: TestExtractFancyNumber (0.00s)
--- PASS: TestExtractFancyNumber/Extract_fancy_number_11 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_fancy_number_0 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_a_differentFancyNumber_returns_0 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_an_invalid_fancy_number_returns_0 (0.00s)
=== RUN TestDescribeFancyNumberBox
=== RUN TestDescribeFancyNumberBox/Describe_fancy_number_12
=== RUN TestDescribeFancyNumberBox/Describe_fancy_number_0
=== RUN TestDescribeFancyNumberBox/Describe_a_different_fancy_number
=== RUN TestDescribeFancyNumberBox/Describe_a_valid_different_fancy_number
--- PASS: TestDescribeFancyNumberBox (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_fancy_number_12 (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_fancy_number_0 (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_a_different_fancy_number (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_a_valid_different_fancy_number (0.00s)
=== RUN TestDescribeAnything
=== RUN TestDescribeAnything/Describe_7.2
=== RUN TestDescribeAnything/Describe_42
=== RUN TestDescribeAnything/Describe_NumberBox_with_16
=== RUN TestDescribeAnything/Describe_FancyNumber_with_16
=== RUN TestDescribeAnything/Describe_a_different_FancyNumberBox
=== RUN TestDescribeAnything/Something_unknown_is_labelled_return_to_sender
--- PASS: TestDescribeAnything (0.00s)
--- PASS: TestDescribeAnything/Describe_7.2 (0.00s)
--- PASS: TestDescribeAnything/Describe_42 (0.00s)
--- PASS: TestDescribeAnything/Describe_NumberBox_with_16 (0.00s)
--- PASS: TestDescribeAnything/Describe_FancyNumber_with_16 (0.00s)
--- PASS: TestDescribeAnything/Describe_a_different_FancyNumberBox (0.00s)
--- PASS: TestDescribeAnything/Something_unknown_is_labelled_return_to_sender (0.00s)
=== RUN ExampleDescribeNumber
--- PASS: ExampleDescribeNumber (0.00s)
=== RUN ExampleDescribeNumberBox
--- PASS: ExampleDescribeNumberBox (0.00s)
=== RUN ExampleExtractFancyNumber
--- PASS: ExampleExtractFancyNumber (0.00s)
=== RUN ExampleDescribeFancyNumberBox
--- PASS: ExampleDescribeFancyNumberBox (0.00s)
=== RUN ExampleDescribeAnything
--- PASS: ExampleDescribeAnything (0.00s)
PASS
coverage: 100.0% of statements
ok sorting 0.003s coverage: 100.0% of statements
real 0m0.198s
user 0m0.277s
sys 0m0.174s
==============================================================================
Running: go tool cover -func=coverage.out
sorting/sorting_room.go:9: DescribeNumber 100.0%
sorting/sorting_room.go:20: DescribeNumberBox 100.0%
sorting/sorting_room.go:31: Value 100.0%
sorting/sorting_room.go:42: ExtractFancyNumber 100.0%
sorting/sorting_room.go:60: DescribeFancyNumberBox 100.0%
sorting/sorting_room.go:67: DescribeAnything 100.0%
total: (statements) 100.0%
real 0m0.047s
user 0m0.056s
sys 0m0.064s
==============================================================================
Running: go tool cover -html coverage.out -o coverage.html
real 0m0.049s
user 0m0.071s
sys 0m0.066s
==============================================================================
Running: cover_annotate
Running: gocov convert coverage.out | gocov annotate -ceiling=100 - | tee coverage-annotations.txt
real 0m0.016s
user 0m0.018s
sys 0m0.020s
real 0m0.016s
user 0m0.018s
sys 0m0.020s
==============================================================================
Running: gotest -v -race -covermode=atomic ./...
=== RUN TestDescribeNumber
=== RUN TestDescribeNumber/Describe_4.1
=== RUN TestDescribeNumber/Describe_-3.2
=== RUN TestDescribeNumber/Pads_to_single_decimal_place
=== RUN TestDescribeNumber/Truncates_to_single_decimal_place
--- PASS: TestDescribeNumber (0.00s)
--- PASS: TestDescribeNumber/Describe_4.1 (0.00s)
--- PASS: TestDescribeNumber/Describe_-3.2 (0.00s)
--- PASS: TestDescribeNumber/Pads_to_single_decimal_place (0.00s)
--- PASS: TestDescribeNumber/Truncates_to_single_decimal_place (0.00s)
=== RUN TestDescribeNumberBox
=== RUN TestDescribeNumberBox/Describe_NumberBox_with_4
=== RUN TestDescribeNumberBox/Describe_NumberBox_with_-3
--- PASS: TestDescribeNumberBox (0.00s)
--- PASS: TestDescribeNumberBox/Describe_NumberBox_with_4 (0.00s)
--- PASS: TestDescribeNumberBox/Describe_NumberBox_with_-3 (0.00s)
=== RUN TestExtractFancyNumber
=== RUN TestExtractFancyNumber/Extract_fancy_number_11
=== RUN TestExtractFancyNumber/Extract_fancy_number_0
=== RUN TestExtractFancyNumber/Extract_a_differentFancyNumber_returns_0
=== RUN TestExtractFancyNumber/Extract_an_invalid_fancy_number_returns_0
--- PASS: TestExtractFancyNumber (0.00s)
--- PASS: TestExtractFancyNumber/Extract_fancy_number_11 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_fancy_number_0 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_a_differentFancyNumber_returns_0 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_an_invalid_fancy_number_returns_0 (0.00s)
=== RUN TestDescribeFancyNumberBox
=== RUN TestDescribeFancyNumberBox/Describe_fancy_number_12
=== RUN TestDescribeFancyNumberBox/Describe_fancy_number_0
=== RUN TestDescribeFancyNumberBox/Describe_a_different_fancy_number
=== RUN TestDescribeFancyNumberBox/Describe_a_valid_different_fancy_number
--- PASS: TestDescribeFancyNumberBox (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_fancy_number_12 (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_fancy_number_0 (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_a_different_fancy_number (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_a_valid_different_fancy_number (0.00s)
=== RUN TestDescribeAnything
=== RUN TestDescribeAnything/Describe_7.2
=== RUN TestDescribeAnything/Describe_42
=== RUN TestDescribeAnything/Describe_NumberBox_with_16
=== RUN TestDescribeAnything/Describe_FancyNumber_with_16
=== RUN TestDescribeAnything/Describe_a_different_FancyNumberBox
=== RUN TestDescribeAnything/Something_unknown_is_labelled_return_to_sender
--- PASS: TestDescribeAnything (0.00s)
--- PASS: TestDescribeAnything/Describe_7.2 (0.00s)
--- PASS: TestDescribeAnything/Describe_42 (0.00s)
--- PASS: TestDescribeAnything/Describe_NumberBox_with_16 (0.00s)
--- PASS: TestDescribeAnything/Describe_FancyNumber_with_16 (0.00s)
--- PASS: TestDescribeAnything/Describe_a_different_FancyNumberBox (0.00s)
--- PASS: TestDescribeAnything/Something_unknown_is_labelled_return_to_sender (0.00s)
=== RUN ExampleDescribeNumber
--- PASS: ExampleDescribeNumber (0.00s)
=== RUN ExampleDescribeNumberBox
--- PASS: ExampleDescribeNumberBox (0.00s)
=== RUN ExampleExtractFancyNumber
--- PASS: ExampleExtractFancyNumber (0.00s)
=== RUN ExampleDescribeFancyNumberBox
--- PASS: ExampleDescribeFancyNumberBox (0.00s)
=== RUN ExampleDescribeAnything
--- PASS: ExampleDescribeAnything (0.00s)
PASS
coverage: 100.0% of statements
ok sorting 1.020s coverage: 100.0% of statements
real 0m1.258s
user 0m0.284s
sys 0m0.181s
==============================================================================
Exit code: 0
real 0m1.600s
user 0m0.726s
sys 0m0.540s
real 0m1.602s
user 0m0.729s
sys 0m0.540s
===============================================================================
gotest -v --run=xxx --bench . --benchmem |& tee benchstat-new.txt
PASS
ok sorting 0.002s
real 0m0.163s
user 0m0.174s
sys 0m0.155s
===============================================================================
gotest -v -tags bonus
=== RUN TestDescribeNumber
=== RUN TestDescribeNumber/Describe_4.1
=== RUN TestDescribeNumber/Describe_-3.2
=== RUN TestDescribeNumber/Pads_to_single_decimal_place
=== RUN TestDescribeNumber/Truncates_to_single_decimal_place
--- PASS: TestDescribeNumber (0.00s)
--- PASS: TestDescribeNumber/Describe_4.1 (0.00s)
--- PASS: TestDescribeNumber/Describe_-3.2 (0.00s)
--- PASS: TestDescribeNumber/Pads_to_single_decimal_place (0.00s)
--- PASS: TestDescribeNumber/Truncates_to_single_decimal_place (0.00s)
=== RUN TestDescribeNumberBox
=== RUN TestDescribeNumberBox/Describe_NumberBox_with_4
=== RUN TestDescribeNumberBox/Describe_NumberBox_with_-3
--- PASS: TestDescribeNumberBox (0.00s)
--- PASS: TestDescribeNumberBox/Describe_NumberBox_with_4 (0.00s)
--- PASS: TestDescribeNumberBox/Describe_NumberBox_with_-3 (0.00s)
=== RUN TestExtractFancyNumber
=== RUN TestExtractFancyNumber/Extract_fancy_number_11
=== RUN TestExtractFancyNumber/Extract_fancy_number_0
=== RUN TestExtractFancyNumber/Extract_a_differentFancyNumber_returns_0
=== RUN TestExtractFancyNumber/Extract_an_invalid_fancy_number_returns_0
--- PASS: TestExtractFancyNumber (0.00s)
--- PASS: TestExtractFancyNumber/Extract_fancy_number_11 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_fancy_number_0 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_a_differentFancyNumber_returns_0 (0.00s)
--- PASS: TestExtractFancyNumber/Extract_an_invalid_fancy_number_returns_0 (0.00s)
=== RUN TestDescribeFancyNumberBox
=== RUN TestDescribeFancyNumberBox/Describe_fancy_number_12
=== RUN TestDescribeFancyNumberBox/Describe_fancy_number_0
=== RUN TestDescribeFancyNumberBox/Describe_a_different_fancy_number
=== RUN TestDescribeFancyNumberBox/Describe_a_valid_different_fancy_number
--- PASS: TestDescribeFancyNumberBox (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_fancy_number_12 (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_fancy_number_0 (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_a_different_fancy_number (0.00s)
--- PASS: TestDescribeFancyNumberBox/Describe_a_valid_different_fancy_number (0.00s)
=== RUN TestDescribeAnything
=== RUN TestDescribeAnything/Describe_7.2
=== RUN TestDescribeAnything/Describe_42
=== RUN TestDescribeAnything/Describe_NumberBox_with_16
=== RUN TestDescribeAnything/Describe_FancyNumber_with_16
=== RUN TestDescribeAnything/Describe_a_different_FancyNumberBox
=== RUN TestDescribeAnything/Something_unknown_is_labelled_return_to_sender
--- PASS: TestDescribeAnything (0.00s)
--- PASS: TestDescribeAnything/Describe_7.2 (0.00s)
--- PASS: TestDescribeAnything/Describe_42 (0.00s)
--- PASS: TestDescribeAnything/Describe_NumberBox_with_16 (0.00s)
--- PASS: TestDescribeAnything/Describe_FancyNumber_with_16 (0.00s)
--- PASS: TestDescribeAnything/Describe_a_different_FancyNumberBox (0.00s)
--- PASS: TestDescribeAnything/Something_unknown_is_labelled_return_to_sender (0.00s)
=== RUN ExampleDescribeNumber
--- PASS: ExampleDescribeNumber (0.00s)
=== RUN ExampleDescribeNumberBox
--- PASS: ExampleDescribeNumberBox (0.00s)
=== RUN ExampleExtractFancyNumber
--- PASS: ExampleExtractFancyNumber (0.00s)
=== RUN ExampleDescribeFancyNumberBox
--- PASS: ExampleDescribeFancyNumberBox (0.00s)
=== RUN ExampleDescribeAnything
--- PASS: ExampleDescribeAnything (0.00s)
PASS
ok sorting 0.002s
real 0m0.134s
user 0m0.187s
sys 0m0.148s
===============================================================================
No old benchmarks to run benchstat against.
===============================================================================
gomarkdoc --output sorting-doc.md
real 0m0.011s
user 0m0.007s
sys 0m0.004s
===============================================================================
go doc -all sorting
package sorting // import "sorting"
FUNCTIONS
func DescribeAnything(i interface{}) string
DescribeAnything should return a string describing whatever it contains.
func DescribeFancyNumberBox(fnb FancyNumberBox) string
DescribeFancyNumberBox should return a string describing the FancyNumberBox.
func DescribeNumber(f float64) string
DescribeNumber should return a string describing the number.
func DescribeNumberBox(nb NumberBox) string
DescribeNumberBox should return a string describing the NumberBox.
func ExtractFancyNumber(fnb FancyNumberBox) int
ExtractFancyNumber should return the integer value for a FancyNumber and 0
if any other FancyNumberBox is supplied.
TYPES
type FancyNumber struct {
// Has unexported fields.
}
FancyNumber struct that holds a string number.
func (i FancyNumber) Value() string
Value is a FancyNumber method.
type FancyNumberBox interface {
Value() string
}
FancyNumberBox struct method set interface.
type NumberBox interface {
Number() int
}
NumberBox struct method set interface.
real 0m0.046s
user 0m0.054s
sys 0m0.063s
===============================================================================