Skip to content

Commit

Permalink
Use string.format to fix floating point error in test output
Browse files Browse the repository at this point in the history
  • Loading branch information
sparr committed Sep 15, 2024
1 parent 6614170 commit 9feb624
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/full/projects.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ local function doProjects(pathname)
for uri in files.eachFile() do
local fileClock = os.clock()
diag.doDiagnostic(uri, true)
print('诊断文件耗时:', os.clock() - fileClock, uri)
print('诊断文件耗时:', string.format("%.6f", os.clock() - fileClock), uri)
end

local passed = os.clock() - clock
Expand Down
2 changes: 1 addition & 1 deletion test/full/self.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ for uri in files.eachFile() do
end)
local fileClock = os.clock()
diag.doDiagnostic(uri, true)
print('诊断文件耗时:', os.clock() - fileClock, uri)
print('诊断文件耗时:', string.format("%.6f", os.clock() - fileClock), uri)
::CONTINUE::
end

Expand Down

0 comments on commit 9feb624

Please sign in to comment.