Commit Graph

303 Commits

Author SHA1 Message Date
Alexis King
714b7684fe Add stream/c contract for adding contracts on stream contents 2015-02-13 20:14:03 -06:00
Matthew Flatt
fa00d01b6f fix SRFI-14 tests for Unicode 7.0 2015-02-12 10:14:52 -07:00
Sam Tobin-Hochstadt
d3b018b7cb Re-do projections for struct fields in chaperone handlers.
If the selector is itself a chaperone, then doing the access once
will mean that the saved result is not `chaperone-of?` the result
of doing the access a second time, at least in some cases (such as
when the accessor uses vector contracts).

Thanks to Neil T for initial spotting, and to Robby for actually
finding the bug and suggesting the fix.
2015-02-12 09:50:57 -05:00
Matthew Flatt
be8f70fffb racket/unit: static checking of initialization dependencies
When using `compound-unit/infer` and similar, check the `link` clause
against each unit's static information for initialization dependencies.
Also, propagate dependency information in `define-compount-unit`.
2015-02-06 09:22:01 +01:00
Matthew Flatt
53fb33144e add unit-static-init-dependencies 2015-02-06 08:55:58 +01:00
Robby Findler
ffd77693ee fix a bug in random contract generation that could cause
nested structure to have contract-random-generate-fail stuck
into it

and clean up some confusing structure in the random generator
2015-02-02 22:15:05 -06:00
Ryan Culpepper
3029867e9f fix reified-syntax-class-curry (missing role argument) 2015-01-29 20:37:50 -05:00
Matthew Flatt
b7e86ef6c9 syntax/modcollapse: fix to new collapse-module-path-index variant 2015-01-28 16:21:43 -07:00
Matthew Flatt
7bee7bbadc collapse-module-path-index: support relative module path flattening
Unlike `collapse-module-path`, it makes sense for
`collapse-module-path-index` to convert a relative module path index
to a plain module path. In other words, `collapse-module-path-index`
can convert a module path index to a module path.
2015-01-27 08:40:10 -07:00
Robby Findler
d74b0a6bf4 between/c (unlike integer-in) can actually just disappear
when the arguments are = to each other
2015-01-25 19:23:38 -06:00
Robby Findler
6551cc00d6 make (integer-in x x) produce (and/c x exact?)
fix bug in 9f59d57ee
2015-01-25 15:31:04 -06:00
Robby Findler
87a231b792 fix a bug in the way that an old style projection
was created when a val-first-projection was needed
2015-01-25 15:08:12 -06:00
Robby Findler
eb7c6653f3 make the contract random generator sometimes
generate inexact/exact variants of numbers
when the exact/inexact one was originally
present in the contract
2015-01-23 22:40:54 -06:00
Robby Findler
cc642c3382 change +nan.0 and +nan.f, when viewed as contracts, to
be equal?-based contracts instead of = based contracts.

Before this change, the contract (or/c 1 2 +nan.0) was the same
contract as (or/c 1 2), because +nan.0 was the same contract as
the predicate (lambda (x) (= x +nan.0)), which is the same as
(lambda (x) #f). Now, +nan.0 and +nan.f are the only numbers
that are treated as equal?-based contracts, but this means that
(or/c 1 2 +nan.0) actually accepts +nan.0.
2015-01-23 21:57:51 -06:00
Robby Findler
cb68141ff6 do tests for f2bacdc6f properly 2015-01-21 10:05:09 -06:00
Robby Findler
7003ca6eb3 add test case for previous commit 2015-01-21 08:39:47 -06:00
Alexis King
3ab1ad8c93 Implement chaperones, impersonators, and contracts for async-channels 2015-01-19 19:58:51 -06:00
Robby Findler
b6000de2f7 fix ->i dependency check 2015-01-19 10:23:59 -06:00
Matthew Flatt
d044fa0beb fix test
Previously merged to `set-file` utilities, but incorrectly.
2015-01-18 06:46:09 -07:00
Matthew Flatt
02b745d19a fix a test
Using `racket` now creates a will executor via `ffi/unsafe`, which
interferes with the test's expected count, while using `racket/base`
doesn't.
2015-01-18 06:24:58 -07:00
Sam Tobin-Hochstadt
820638f41d Allow ";" in contract error messages. 2015-01-07 15:10:13 -05:00
Robby Findler
2b07cc34f7 fix context for instanceof/c
also improve test suite to look for ellipses
(but not when using opt/c)
2015-01-04 15:10:58 -06:00
Robby Findler
2cd8e620d4 improve error message in certain tricky case when keywords are involved 2015-01-04 15:00:22 -06:00
Robby Findler
95dcee18c7 add a cons/dc generator
Not really sure about this one. The API kind of
forces my hand here and the way this works limits
the non-dep side of the dependent pair to always
be drawn from a fixed set. Not sure if that matters
in practice or not.
2015-01-03 19:25:25 -06:00
Robby Findler
e25575b16a improve contract random generation for null? and recursive-contract 2015-01-03 17:16:52 -06:00
Robby Findler
44073e31b4 add missing neg-party
closes PR 14915
2015-01-01 09:56:00 -06:00
Robby Findler
94a450999a add stronger and random generation for integer-in 2014-12-25 22:07:05 -06:00
Robby Findler
3372ba3547 fix test after improvement in d5bb6030 2014-12-23 17:57:08 -06:00
Robby Findler
94d80f0171 add #:pre/desc and #:post/desc to ->i 2014-12-22 22:31:17 -06:00
Robby Findler
9d58a067e3 add #:pre/desc to ->* 2014-12-22 14:53:25 -06:00
Robby Findler
aabe9d7bad added dynamic->* 2014-12-20 22:48:26 -06:00
Matthew Flatt
7b8707e576 raco pkg: adjust staging of Git clone installs and updates
If the clone directory's checkout includes a target commit, then
use the clone directory directly for staging (i.e., for checking
dependencies and collisions). That way, changes made locally are
used for metadata checks.
2014-12-20 12:25:58 -07:00
Robby Findler
a8ba4eca35 adjust hash/c so that it always copies immutable hashes
before this commit it would copy them only when the weren't
already impersonated/chaperoned, leading to different
contract checking that can be confusing in that case

it did this because the chaperone-of? check wasn't general
enough to cope with copying always, but since commit
b05d07ad10 it now is
2014-12-19 10:58:53 -06:00
Sam Tobin-Hochstadt
74786ed8d0 Finish fixing dependencies of "racket-test-core".
This required moving some tests to "racket-test", and putting them
in modules that use `rackunit`. Also, some uses of rackunit were
removed and switched to more primitive systems. Some improvements
here, particularly in "foreign-test.rktl", would still be good,
but everything passes at the moment.
2014-12-19 11:35:39 -05:00
Robby Findler
9e9dcf2f50 added hash/dc 2014-12-18 22:31:20 -06:00
Sam Tobin-Hochstadt
a59ad8b929 Move tests for SRFIs to "racket-test". 2014-12-18 15:23:44 -05:00
Matthew Flatt
edf562be5e raco pkg update: fix conflict checking vs. installed being updated 2014-12-17 07:51:04 -07:00
Matthew Flatt
9b9546c0bf raco pkg update: adjust --update-deps handling, again
Still trying to get the dependencies-have-changed-for-a-link case
right without breaking other cases.
2014-12-16 13:37:48 -07:00
Matthew Flatt
e22242df56 raco pkg: default --deps to search-ask in interactive mode
The implemented default for `raco pkg update` actually depended on the
way that a package is installed, and it's difficult to reason about or
to implement the default that is suggested by the documentation.
Meanwhile, `search-ask` seems the most sensible always in interactive
mode (now that we have a way to specify batch mode).
2014-12-15 09:13:24 -07:00
Sam Tobin-Hochstadt
3bb896d6cb Use racket instead of scheme. Fixes dependency issues. 2014-12-15 02:45:32 -05:00
Sam Tobin-Hochstadt
448213e9dc Split the core racket tests into the "racket-test-core" pkg.
This supports running the core tests on systems which can't run
or don't want to install all the dependencies of the "racket-test"
package.

The "racket-test-core" pkg stil depends on "sandbox-lib" because
the sandbox tests live with the core tests. Hopefully I'll be able
to fix that eventually.
2014-12-15 01:59:56 -05:00
Gustavo Massaccesi
58ef3fdaa8 Mark immutable? as omitable 2014-12-14 08:46:14 -07:00
Matthew Flatt
1ef244f4b7 raco pkg: fix tests for change raco pkg show output 2014-12-14 08:46:13 -07:00
Robby Findler
b1a22bfd29 fix buggy test case 2014-12-13 14:57:01 -06:00
Robby Findler
c3e92093f6 improve the way '() is treated as a constant
so it fits in with stronger and whatnot and
the other list contracts
2014-12-13 14:55:13 -06:00
Robby Findler
6f09e7c619 add cons/dc 2014-12-12 23:41:09 -06:00
Matthew Flatt
d780930056 fix syntax-disarm with a #f second argument 2014-12-12 07:59:16 -07:00
Sam Tobin-Hochstadt
be8ac0c5d0 Create the "racket-extra-test" to reduce dependencies.
It initially contains the two tests that use redex-driven random
testing.
2014-12-11 18:15:27 -05:00
Matthew Flatt
195a46a23e fix problem with truncated value printing and stack overflow
A value-printing truncation discovered after a stack-overflow handle
and return could go badly, because the truncation escape wasn't
reset correctly after overflow handling (in contrast to truncation
discovered during the overflow handling, which was handled correctly).

Closes PR 14870
2014-12-09 09:22:12 -07:00
Asumu Takikawa
1e5ec02262 Add test props for racket/generic tests 2014-12-08 22:04:50 -05:00
Matthew Flatt
3eac913a78 fix thread-based place implementation
There are some limitations to the places implementation when
`(place-enabled?)` returns #f, but mostly it can work.
2014-12-08 16:45:54 -07:00
Matthew Flatt
06c82877db raco pkg: add trash directory for removed/updated package installations
Packages that are installed as other than a link are not meant to be
edited, but work can get lost if a package is edited and then removed
or updated. Avoid that work loss by moving removed or updated packages
to a trash folder.

By default, the trash folder holds up to 512 packages for up to 48
hours. To disable the trash folder (for a given scope), use

 raco pkg config --set max-trash-packages 0

(I expect that some variant of Greenspun's rule predicted the eventual
inclusion of "backup" management in the package system.)
2014-12-08 16:44:31 -07:00
Matthew Flatt
2d4f3e2ac9 remove the "racket-pkgs" directory layer
The layer is now redundant, since everything left in "pkgs" is in the
"racket-pkgs" category.
2014-12-08 05:22:59 -07:00