From 7914f54b74e2169c37cd1ad31bd4ced2858e7a37 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sat, 21 Sep 2024 01:06:16 -0400 Subject: [PATCH] Adapt addTest(String) for tests as functions --- M2/Macaulay2/m2/testing.m2 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/M2/Macaulay2/m2/testing.m2 b/M2/Macaulay2/m2/testing.m2 index d102b6c9f7..ada39bb4ed 100644 --- a/M2/Macaulay2/m2/testing.m2 +++ b/M2/Macaulay2/m2/testing.m2 @@ -24,8 +24,9 @@ addTest FunctionClosure := f -> ( -- the following is not called by TEST, but called directly when we want to -- add a test from a file (used by loadTestDir) -addTest String := filename -> addTest(get filename, - new FilePosition from(filename, 1, 1)) +-- TODO: improve this so that "locate" sends us to the source file +addTest String := filename -> addTest(() -> get filename) + -- TODO: support test titles -----------------------------------------------------------------------------