# Copyright 2005-2007 Kevin Reid, under the terms of the MIT X license # found at http://www.opensource.org/licenses/mit-license.html ................ Testing that the makeBrand implementation is in fact DeepFrozen. Ordinary makeBrand is merely stamped DeepFrozen since it is employed by the DeepFrozen auditor. ? (DeepFrozen) # value: ? def makeBrand := # value: ? def [aSealer, aUnsealer] := makeBrand("a") # value: ? def amplifiable { > to __optSealedDispatch(brand) :any { > if (brand == aSealer.getBrand()) { > return aSealer.seal("hi") > } > } > } # value: ? def brokenAmp { > to __optSealedDispatch(brand) :any { > if (brand == aSealer.getBrand()) { > return "grr" > } > } > } # value: ? [aUnsealer.amplify(amplifiable)] # value: [["hi"]] ? [aUnsealer.amplify("unamplifiable")] # value: [null] ? [aUnsealer.amplify(brokenAmp)] # problem: "grr" is not a a sealed box XXX test basic sealing/unsealing