summaryrefslogtreecommitdiffstats
path: root/test/scan-once.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-12-29 21:04:56 (GMT)
committerSteven Knight <knight@baldmt.com>2004-12-29 21:04:56 (GMT)
commitf30bc35b4edccf597b5cd4474ea6b089f9cdc30c (patch)
tree12b6722f049211b37574477e82ab5c49a0521052 /test/scan-once.py
parentb60cfbedd5f09842e6a9429711841a04cf404ef4 (diff)
downloadSCons-f30bc35b4edccf597b5cd4474ea6b089f9cdc30c.zip
SCons-f30bc35b4edccf597b5cd4474ea6b089f9cdc30c.tar.gz
SCons-f30bc35b4edccf597b5cd4474ea6b089f9cdc30c.tar.bz2
Add a Memoizer metaclass to collect the logic for caching values in one location. Convert by-hand caching to use of Memoizer. (Kevin Quick)
Diffstat (limited to 'test/scan-once.py')
-rw-r--r--test/scan-once.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/scan-once.py b/test/scan-once.py
index 7019e23..4436310 100644
--- a/test/scan-once.py
+++ b/test/scan-once.py
@@ -481,14 +481,21 @@ test.run(arguments = 'SLF',
# XXX Note that the generated .h files still get scanned twice,
# once before they're generated and once after. That's the
# next thing to fix here.
-test.fail_test(test.read("MyCScan.out", "rb") != """\
+
+# Note KWQ 01 Nov 2004: used to check for a one for all counts below;
+# this was indirectly a test that the caching method in use at the
+# time was working. With the introduction of Memoize-based caching,
+# the caching is performed right at the interface level, so the test
+# here cannot be run the same way; ergo real counts are used below.
+
+test.must_match("MyCScan.out", """\
libg_1.c: 1
libg_2.c: 1
libg_3.c: 1
-libg_gx.h: 1
+libg_gx.h: 3
libg_gy.h: 1
libg_gz.h: 1
-libg_w.h: 1
+libg_w.h: 3
""")
test.pass_test()