-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a list instead of a hash table for storing package tests #3419
Changes from all commits
89110d0
85b63be
ff85e40
aa978d1
8a081e3
ed6bf3e
21f73cc
b0d2fc3
57530ba
32a3590
a6e0d19
46f5387
6088980
690105d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1248,6 +1248,7 @@ TEST /// | |
TEST | ||
/// -- DON'T TEST YET?? | ||
-- no-check-flag (encountered an unknown key or option: Engine) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mikestillman - This test appears to never have been run since I'm proposing that we continue skipping it for now (which There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Was there an engine implementation that got removed or never got added? Seems strange. |
||
testLLL = (m) -> ( | ||
-- Test 1: | ||
remove(m.cache,symbol LLL); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -241,6 +241,6 @@ Node | |
and @TO "Text :: Text"@. | ||
SeeAlso | ||
installPackage | ||
TEST | ||
symbol TEST | ||
check | ||
/// |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,7 @@ Node | |
Example | ||
check SimpleDoc | ||
SeeAlso | ||
TEST | ||
symbol TEST | ||
check | ||
packageTemplate | ||
"docExample" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,14 +7,17 @@ loadPackage("TestPackage", FileName => testpkg) | |
check "TestPackage" | ||
pkgtest = tests(0, "TestPackage") | ||
assert instance(pkgtest, TestInput) | ||
assert Equation(toSequence locate pkgtest, (testpkg, 3, 1, 4, 1,,)) | ||
assert Equation(toString pkgtest, testpkg | ":3:1-4:1") | ||
assert Equation(net pkgtest, "TestInput[" | testpkg | ":3:1-4:1]") | ||
expectedCode = " -- " | toAbsolutePath testpkg | | ||
":4:1: location of test code" | newline | "assert Equation(1 + 1, 2)" | ||
assert Equation(code pkgtest, expectedCode) | ||
assert Equation(code 0, expectedCode) | ||
|
||
assert Equation(toSequence locate pkgtest, (testpkg, 3, 5, 3, 32, 3, 5)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This happened in a brew build: -- running check(357, "Core") -- .380111s elapsed
/opt/homebrew/Cellar/macaulay2/1.24.11-rc1/share/doc/Macaulay2/Core/tests/testing.m2:1:1 error:
-- i5 : pkgtest = tests(0, "TestPackage")
--
-- o5 = TestInput[../../M2-93313-0/0.m2:3:5-3:32]
--
-- o5 : TestInput
--
-- i6 : assert instance(pkgtest, TestInput)
--
-- i7 : assert Equation(toSequence locate pkgtest, (testpkg, 3, 5, 3, 32, 3, 5))
-- stdio:10:6:(3): error: assertion failed:
-- (../../M2-93313-0/0.m2, 3, 5, 3, 32, 3, 5) == (/private/tmp/M2-93313-0/0.m2, 3, 5, 3, 32, 3, 5) is false
--
stdio:1:5:(3): error: test(s) #333 of package Core failed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, that makes sense. Calling |
||
assert Equation(toString pkgtest, "assert Equation(1 + 1, 2)") | ||
assert Equation(net pkgtest, "TestInput[" | testpkg | ":3:5-3:32]") | ||
beginDocumentation() | ||
expectedCode = DIV{ | ||
new FilePosition from (testpkg, 3, 5, 3, 32, 3, 5), | ||
": --source code:", | ||
PRE{CODE{"class" => "language-macaulay2", | ||
"TEST \"assert Equation(1 + 1, 2)\""}}} | ||
assert BinaryOperation(symbol ===, code pkgtest, expectedCode) | ||
assert BinaryOperation(symbol ===, code 0, expectedCode) | ||
|
||
assert( (for i from 1 to 2 list { for j from 1 to 2 do { if j == 2 then break 444; } }) === {{444}, {444}} ) -- see issue #2522 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading this line, I would be more confused about where to look for that file than before. You can of course go with whatever solution you prefer in your package.