Решение на Фабрика за регулярни изрази от Красимир Стойков
Обратно към всички решения
Към профила на Красимир Стойков
Резултати
- 6 точки от тестове
- 2 бонус точки
- 8 точки общо
- 5 успешни тест(а)
- 4 неуспешни тест(а)
Код
Лог от изпълнението
PASS
ok _/tmp/d20150111-18989-1m0fcrw 0.003s
PASS
ok _/tmp/d20150111-18989-1m0fcrw 0.003s
PASS
ok _/tmp/d20150111-18989-1m0fcrw 0.003s
--- FAIL: TestUnableToProcess (0.00 seconds)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 22 [running]:
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xe9
testing.func·006()
/usr/local/go/src/pkg/testing/testing.go:416 +0x12d
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:248 +0x176
_/tmp/d20150111-18989-1m0fcrw.(*Factory).generateRegexp(0x1841a2a0, 0xb7e08f70, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
/tmp/d20150111-18989-1m0fcrw/solution.go:68 +0x43e
_/tmp/d20150111-18989-1m0fcrw.TestUnableToProcess(0x18404360)
/tmp/d20150111-18989-1m0fcrw/solution_test.go:44 +0x202
testing.tRunner(0x18404360, 0x81e52e4)
/usr/local/go/src/pkg/testing/testing.go:422 +0x87
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:504 +0x720
goroutine 16 [chan receive]:
testing.RunTests(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x8116a01)
/usr/local/go/src/pkg/testing/testing.go:505 +0x75c
testing.Main(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x81eb520, 0x0, 0x0, 0x81eb520, 0x0, 0x0)
/usr/local/go/src/pkg/testing/testing.go:435 +0x6e
main.main()
_/tmp/d20150111-18989-1m0fcrw/_test/_testmain.go:63 +0x86
goroutine 19 [finalizer wait]:
runtime.park(0x8059a90, 0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x94
runtime.parkunlock(0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3f
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xc5
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
exit status 2
FAIL _/tmp/d20150111-18989-1m0fcrw 0.004s
--- FAIL: TestProcessOneWord (0.00 seconds)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 21 [running]:
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xe9
testing.func·006()
/usr/local/go/src/pkg/testing/testing.go:416 +0x12d
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:248 +0x176
_/tmp/d20150111-18989-1m0fcrw.(*Factory).generateRegexp(0x1841a270, 0xb7eeef70, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
/tmp/d20150111-18989-1m0fcrw/solution.go:68 +0x43e
_/tmp/d20150111-18989-1m0fcrw.TestProcessOneWord(0x18404240)
/tmp/d20150111-18989-1m0fcrw/solution_test.go:58 +0x20c
testing.tRunner(0x18404240, 0x81e52f0)
/usr/local/go/src/pkg/testing/testing.go:422 +0x87
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:504 +0x720
goroutine 16 [chan receive]:
testing.RunTests(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x8116a01)
/usr/local/go/src/pkg/testing/testing.go:505 +0x75c
testing.Main(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x81eb520, 0x0, 0x0, 0x81eb520, 0x0, 0x0)
/usr/local/go/src/pkg/testing/testing.go:435 +0x6e
main.main()
_/tmp/d20150111-18989-1m0fcrw/_test/_testmain.go:63 +0x86
goroutine 19 [finalizer wait]:
runtime.park(0x8059a90, 0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x94
runtime.parkunlock(0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3f
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xc5
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
exit status 2
FAIL _/tmp/d20150111-18989-1m0fcrw 0.003s
--- FAIL: TestProcessWithoutEnoughMaterials (0.00 seconds)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 21 [running]:
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xe9
testing.func·006()
/usr/local/go/src/pkg/testing/testing.go:416 +0x12d
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:248 +0x176
_/tmp/d20150111-18989-1m0fcrw.(*Factory).generateRegexp(0x1841a300, 0xb7e4bf70, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0)
/tmp/d20150111-18989-1m0fcrw/solution.go:68 +0x43e
_/tmp/d20150111-18989-1m0fcrw.TestProcessWithoutEnoughMaterials(0x18404240)
/tmp/d20150111-18989-1m0fcrw/solution_test.go:73 +0x20c
testing.tRunner(0x18404240, 0x81e52fc)
/usr/local/go/src/pkg/testing/testing.go:422 +0x87
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:504 +0x720
goroutine 16 [chan receive]:
testing.RunTests(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x8116a01)
/usr/local/go/src/pkg/testing/testing.go:505 +0x75c
testing.Main(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x81eb520, 0x0, 0x0, 0x81eb520, 0x0, 0x0)
/usr/local/go/src/pkg/testing/testing.go:435 +0x6e
main.main()
_/tmp/d20150111-18989-1m0fcrw/_test/_testmain.go:63 +0x86
goroutine 19 [finalizer wait]:
runtime.park(0x8059a90, 0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x94
runtime.parkunlock(0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3f
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xc5
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
exit status 2
FAIL _/tmp/d20150111-18989-1m0fcrw 0.003s
--- FAIL: TestOrderWithSeveralWords (0.00 seconds)
panic: runtime error: index out of range [recovered]
panic: runtime error: index out of range
goroutine 21 [running]:
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:279 +0xe9
testing.func·006()
/usr/local/go/src/pkg/testing/testing.go:416 +0x12d
runtime.panic(0x81391c0, 0x81e6f9c)
/usr/local/go/src/pkg/runtime/panic.c:248 +0x176
_/tmp/d20150111-18989-1m0fcrw.(*Factory).generateRegexp(0x1841a270, 0xb7e87f78, 0x3, 0x3, 0x0, 0x0, 0x0, 0x0)
/tmp/d20150111-18989-1m0fcrw/solution.go:68 +0x43e
_/tmp/d20150111-18989-1m0fcrw.TestOrderWithSeveralWords(0x18404240)
/tmp/d20150111-18989-1m0fcrw/solution_test.go:100 +0x20c
testing.tRunner(0x18404240, 0x81e5308)
/usr/local/go/src/pkg/testing/testing.go:422 +0x87
created by testing.RunTests
/usr/local/go/src/pkg/testing/testing.go:504 +0x720
goroutine 16 [chan receive]:
testing.RunTests(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x8116a01)
/usr/local/go/src/pkg/testing/testing.go:505 +0x75c
testing.Main(0x817d39c, 0x81e52c0, 0x9, 0x9, 0x81eb520, 0x0, 0x0, 0x81eb520, 0x0, 0x0)
/usr/local/go/src/pkg/testing/testing.go:435 +0x6e
main.main()
_/tmp/d20150111-18989-1m0fcrw/_test/_testmain.go:63 +0x86
goroutine 19 [finalizer wait]:
runtime.park(0x8059a90, 0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1369 +0x94
runtime.parkunlock(0x81e98c0, 0x81e8ca9)
/usr/local/go/src/pkg/runtime/proc.c:1385 +0x3f
runfinq()
/usr/local/go/src/pkg/runtime/mgc0.c:2644 +0xc5
runtime.goexit()
/usr/local/go/src/pkg/runtime/proc.c:1445
exit status 2
FAIL _/tmp/d20150111-18989-1m0fcrw 0.004s
PASS
ok _/tmp/d20150111-18989-1m0fcrw 0.003s
PASS
ok _/tmp/d20150111-18989-1m0fcrw 0.003s
История (1 версия и 0 коментара)
Красимир обнови решението на 31.12.2014 23:59 (преди над 3 години)