www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 4c84b1625d7d3b977eb9f81ab130c3da1a1c31b0
parent 49b3287758b77a3a8c985d01322bb8a2769caa4a
Author: Georges Dupéron <georges.duperon@gmail.com>
Date:   Mon,  3 Oct 2016 01:29:53 +0200

Run Travis on 2 threads only, to avoid OOM when compiling phc-adt. Added and used check-equal?-values: form.

Diffstat:
M.travis.yml | 2+-
Mscribblings/phc-graph.scrbl | 4++++
Atest/ck.rkt | 22++++++++++++++++++++++
Mtest/test-traversal-1.rkt | 21++++++++++++++-------
4 files changed, 41 insertions(+), 8 deletions(-)

diff --git a/.travis.yml b/.travis.yml @@ -41,7 +41,7 @@ before_install: - export PATH="${RACKET_DIR}/bin:${PATH}" #install-racket.sh can't set for us install: - - raco pkg install --deps search-auto + - raco pkg install -j 2 --deps search-auto before_script: diff --git a/scribblings/phc-graph.scrbl b/scribblings/phc-graph.scrbl @@ -5,6 +5,10 @@ @title{Ph.C Graph library} @author[@author+email["Georges Dupéron" "georges.duperon@gmail.com"]] +This library is implmented using literate programming. The +implementation details are presented in +@other-doc['(lib "phc-graph/scribblings/phc-graph-implementation.scrbl")]. + @defmodule[phc-graph] Package Description Here diff --git a/test/ck.rkt b/test/ck.rkt @@ -0,0 +1,21 @@ +#lang typed/racket/base + +(require phc-toolkit + (for-syntax racket/base + syntax/parse + type-expander/expander + phc-toolkit/untyped)) + +(provide check-equal?-values:) + +(define-syntax check-equal?-values: + (syntax-parser + [(_ actual {~maybe :colon type} expected ...) + (quasisyntax/top-loc this-syntax + (check-equal?: (call-with-values (ann (λ () actual) + (-> #,(if (attribute type) + #'type + #'AnyValues))) + (λ l l)) + (list expected ...)))])) + +\ No newline at end of file diff --git a/test/test-traversal-1.rkt b/test/test-traversal-1.rkt @@ -1,14 +1,22 @@ #lang typed/racket -(require "../traversal.hl.rkt") +(require "../traversal.hl.rkt" + "ck.rkt") (define-fold f₁ t₁ Null String) ;(define-fold f₂ t₂ (Pairof Null Null) String) ;(define-fold f₃ t₃ String String) ;(define-fold f₄ t₄ (Pairof Null String) String) -((f₁ string? - (λ ([x : String] [acc : Integer]) - (values (string->symbol x) acc))) - '() - 0) -\ No newline at end of file +(define f₁-string->symbol + (f₁ string? + (λ ([x : String] [acc : Integer]) + (values (string->symbol x) acc)))) +(check-equal?-values: (f₁-string->symbol '() 0) + '() 0) + +(check-equal?-values: (f₁-string->symbol '() 0) + : (Values Null Integer) + '() 0) + +