This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Hoge { | |
static void hoge() { | |
assertThat( | |
event(“TDD Boot Camp”), | |
goUpTo(8f).byEleveter); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smile: ☺ | |
☺: | |
echo ☺ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: test | |
test: | |
env gosh game-of-life-test.scm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define (assert-true actual message) | |
(if actual #t (raise message))) | |
(assert-true #t "would returns #t") | |
(assert-true #f "would throws error") | |
(define (assert-equals expected actual determiner) | |
(assert-true (determiner expected actual) | |
(string-append "expected " (x->string expected) ", but got " (x->string actual)))) | |
(assert-equals 1 1 =) ; => #t | |
(assert-equals 1 2 =) ; throws error |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; 2.28 | |
(define x (list (list 1 2) (list 3 4))) | |
(fringe x) ; (1 2 3 4) | |
(fringe (list x x)) ; (1 2 3 4 1 2 3 4) | |
(define (fringe t) | |
(cond ((null? t) '()) | |
((not (pair? t)) (list t)) | |
(else (append (fringe (car t)) (fringe (cdr t)))))) | |
(define (append list1 list2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
use Test::More qw/no_plan/; | |
my $key = '1,2,'; | |
my ($a1, $a2, $a3) = split /,/o, $key; | |
is($a1, '1'); |