Skip to content

Commit

Permalink
Adapt addTest(String) for tests as functions
Browse files Browse the repository at this point in the history
  • Loading branch information
d-torrance committed Sep 21, 2024
1 parent 13fe158 commit 7914f54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions M2/Macaulay2/m2/testing.m2
Original file line number Diff line number Diff line change
Expand Up @@ -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

-----------------------------------------------------------------------------
Expand Down

0 comments on commit 7914f54

Please sign in to comment.