Lemonad
Jasmine
1.3.1 revision 1354556913
finished in 0.012s
No try/catch
Passing 32 specs
Predicate functions
isReference
should know that Holes and CAS are references
should know that everything else is not a reference
Basic functions
ctor
should return the constructor of the object
Currying functions
curry2
should return a function curried for two args
curry3
should return a function curried for three args
Partial application functions
partial1
should return a function partially applied for the first arg
partial2
should return a function partially applied for the first two args
L
should return a function partially applied for some number of arbitrary args
meth
should wrap a method as a function and allow the target as the first arg
should partially apply and given args.
Monadic functions
actions
should carry forward the intermediate state properly
Reference types and functions
the Hole type
the Hole constructor
should create a mutable 'cell' with a value field
should not allow creation of a mutable 'cell' with a value that fails a validator
should allow creation of a mutable 'cell' with a value that passes a validator
should be a Hole and Object type
setValue
should set a Hole's value
should return the new value
should fail if an invalid value is provided
swap
should set a Hole's value based on the result of a function given its current value
should return the new value
should fail if an invalid value is provided
the CAS type
compareAndSwap
should set a CAS value based on a presumed current value the result of a function given its current value
should be an Object, Hole and CAS type
should return true if successful
should also work with Holes (i.e. define in terms of Hole as base)
should fail if an invalid value is provided
swap
should set a CAS's value based on the result of a function given its current value
should return the new value
should fail if an invalid value is provided
setValue
should set a CAS's value
should return the new value
should fail if an invalid value is provided