Skip to content

Instantly share code, notes, and snippets.

@alcidesfp
Created May 31, 2012 16:44
Show Gist options
  • Save alcidesfp/2844665 to your computer and use it in GitHub Desktop.
Save alcidesfp/2844665 to your computer and use it in GitHub Desktop.
Pruebas unitarias de la función dec->hex
;; -*- 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