diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-07T12·27+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-10-07T12·27+0000 |
commit | 5d4171f7fb548e06ecd2440f57322b3c77f1074e (patch) | |
tree | 06f21a5e6dcf38943f58f7e32f4a23f5bed41da7 /src/test.cc | |
parent | 563afb7fcc9d6aabec9b867372ea8d651fd12e89 (diff) |
* Synchronise terminology with the ICSE paper (e.g., slice -> closure,
fstate -> Nix expression). * Fix src/test.cc.
Diffstat (limited to 'src/test.cc')
-rw-r--r-- | src/test.cc | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/src/test.cc b/src/test.cc index d640e335ae77..fb1e62eb3802 100644 --- a/src/test.cc +++ b/src/test.cc @@ -13,23 +13,10 @@ void realise(FSId id) { Nest nest(lvlDebug, format("TEST: realising %1%") % (string) id); - realiseSlice(normaliseFState(id)); + realiseClosure(normaliseNixExpr(id)); } -#if 0 -void realiseFail(FState fs) -{ - try { - realiseFState(fs); - abort(); - } catch (Error e) { - cout << "error (expected): " << e.what() << endl; - } -} -#endif - - struct MySink : DumpSink { virtual void operator () (const unsigned char * data, unsigned int len) @@ -115,8 +102,8 @@ void runTests() addToStore("./test-builder-1.sh", builder1fn, builder1id); ATerm fs1 = ATmake( - "Slice([<str>], [(<str>, <str>, [])])", - ((string) builder1id).c_str(), + "Closure([<str>], [(<str>, <str>, [])])", + builder1fn.c_str(), builder1fn.c_str(), ((string) builder1id).c_str()); FSId fs1id = writeTerm(fs1, ""); @@ -125,8 +112,8 @@ void runTests() realise(fs1id); ATerm fs2 = ATmake( - "Slice([<str>], [(<str>, <str>, [])])", - ((string) builder1id).c_str(), + "Closure([<str>], [(<str>, <str>, [])])", + (builder1fn + "_bla").c_str(), (builder1fn + "_bla").c_str(), ((string) builder1id).c_str()); FSId fs2id = writeTerm(fs2, ""); @@ -137,12 +124,12 @@ void runTests() string out1id = hashString("foo"); /* !!! bad */ string out1fn = nixStore + "/" + (string) out1id + "-hello.txt"; ATerm fs3 = ATmake( - "Derive([(<str>, <str>)], [<str>], <str>, <str>, [(\"out\", <str>)])", + "Derive([(<str>, <str>)], [<str>], <str>, <str>, [], [(\"out\", <str>)])", out1fn.c_str(), ((string) out1id).c_str(), ((string) fs1id).c_str(), - ((string) builder1fn).c_str(), thisSystem.c_str(), + ((string) builder1fn).c_str(), out1fn.c_str()); debug(printTerm(fs3)); FSId fs3id = writeTerm(fs3, ""); @@ -156,8 +143,8 @@ void runTests() addToStore("./test-builder-2.sh", builder4fn, builder4id); ATerm fs4 = ATmake( - "Slice([<str>], [(<str>, <str>, [])])", - ((string) builder4id).c_str(), + "Closure([<str>], [(<str>, <str>, [])])", + builder4fn.c_str(), builder4fn.c_str(), ((string) builder4id).c_str()); FSId fs4id = writeTerm(fs4, ""); @@ -167,12 +154,12 @@ void runTests() string out5id = hashString("bar"); /* !!! bad */ string out5fn = nixStore + "/" + (string) out5id + "-hello2"; ATerm fs5 = ATmake( - "Derive([(<str>, <str>)], [<str>], <str>, <str>, [(\"out\", <str>), (\"builder\", <str>)])", + "Derive([(<str>, <str>)], [<str>], <str>, <str>, [], [(\"out\", <str>), (\"builder\", <str>)])", out5fn.c_str(), ((string) out5id).c_str(), ((string) fs4id).c_str(), - ((string) builder4fn).c_str(), thisSystem.c_str(), + ((string) builder4fn).c_str(), out5fn.c_str(), ((string) builder4fn).c_str()); debug(printTerm(fs5)); |