Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing framework #37

Open
arademaker opened this issue Jun 9, 2015 · 2 comments
Open

testing framework #37

arademaker opened this issue Jun 9, 2015 · 2 comments

Comments

@arademaker
Copy link
Owner

Precisamos decidir por algum framework de testes. Para uma introdução:

http://www.gigamonkeys.com/book/practical-building-a-unit-test-framework.html

Opções:

Vejam resposta que tive na thread coleslaw-org/coleslaw#82 onde foi sugerido a segunda opção acima.

Ver também:

http://eudoxia.me/article/lisp-travis-coveralls/

This was referenced Jun 9, 2015
@paulodt
Copy link
Contributor

paulodt commented Jun 14, 2015

Professor, fiz dois testes com a minha função, "length-form",e um teste com a função "in-tableaux", usando o "fiveam". Se o resultado não for o desejado pelo senhor, faço de outra forma. Os comandos e resultados foram:

--"lentgh-form"
"Break 15 5AM[18]> (ql:quickload :fiveam)To load "fiveam":
Load 1 ASDF system:
fiveam
; Loading "fiveam"

(:FIVEAM)

Break 15 5AM[18]> (in-package :it.bese.fiveam )
#

Break 15 5AM[18]> (test length-form
(is (= 3 (length-form '(implies (and A B) (and C D)))))
(is (= 7 (length-form '(and (and (implies A B) (implies B A)) (and (implies B C) (implies C B)))))))
LENGTH-FORM

Break 15 5AM[18]> (run! 'length-form)

Running test LENGTH-FORM ..
Did 2 checks.
Pass: 2 (100%)
Skip: 0 ( 0%)
Fail: 0 ( 0%)

NIL"

--"in_tableaux"
Break 27 5AM[30]> (test in_tableaux (is (equal '((1 9 2) (2 6 1) (3 4 3) (4 9 2) (6 8 1) (8 7 2)) (in_tableaux
'(0 0 0 0 0 0 0 0 2
0 0 0 0 0 1 0 0 0
0 0 0 3 0 0 0 0 0
0 0 0 0 0 0 0 0 2
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 2 0 0
0 0 0 0 0 0 0 0 0)))))
IN_TABLEAUX

Break 27 5AM[30]> (run! 'in_tableaux)
Running test IN_TABLEAUX .
Did 1 check.
Pass: 1 (100%)
Skip: 0 ( 0%)
Fail: 0 ( 0%)

NIL"

@arademaker
Copy link
Owner Author

Paulo,

O issue não é sobre rodar testes, mas sobre como criar conjuntos de testes usando algum framework para testes. Não adianta rodar apenas alguns testes no REPL. Precisamos criar um conjunto de testes para testar tudo que fizemos até agora.

Seguindo o tutorial https://goo.gl/7sGSZV depois do commit 766364b tive como resposta no SBCL:

TABLEAUX-TEST> (run! 'length-1)
 Didn't run anything...huh?
NIL

Não consegui entender. Talvez algum outro framework seja mais fácil. De qq modo, já reportei problema em lispci/fiveam#21

Não entendi seu teste in_tableaux!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants