Created
May 31, 2012 16:44
-
-
Save alcidesfp/2844665 to your computer and use it in GitHub Desktop.
Pruebas unitarias de la función dec->hex
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
| ;; -*- coding: utf-8; mode: scheme -*- | |
| (cond-expand (chicken (require-extension srfi-64)) | |
| (kawa (require 'srfi-64))) | |
| (load "dec-hex.scm") | |
| (test-begin "dec-hex-suite") | |
| (test-begin "caso-prueba-1") | |
| (let ((pruebas '((253 "FD") | |
| (1234 "4D2") | |
| (42936 "A7B8") | |
| (32 "20") | |
| (0 "0") | |
| (12 "C"))) | |
| (exp-val "") | |
| (act-val "")) | |
| (for-each (lambda (elem) | |
| (let ((exp-val (cadr elem)) | |
| (act-val (dec->hex (car elem)))) | |
| ;;(format #t "exp-val: ~a act-val: ~a~%" exp-val act-val) | |
| (test-equal exp-val act-val))) | |
| pruebas)) | |
| (test-end) | |
| ;;(test-error #t (displayln "Prueba no implementada")) | |
| (test-end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment