aboutsummaryrefslogtreecommitdiff
path: root/tests/bench.lua
diff options
context:
space:
mode:
authorMark Pulford <mark@kyne.com.au>2012-01-19 23:36:16 +1030
committerMark Pulford <mark@kyne.com.au>2012-03-04 18:54:35 +1030
commit31bf122c1d1d9e3812b9ef2555d537f509ae3f05 (patch)
treeb382fa3fecb784598ff8b0c64c1360c3bc24db2a /tests/bench.lua
parenta0961903e3ff846a2bde6faa6d390435cd9937ef (diff)
downloadlua-cjson-31bf122c1d1d9e3812b9ef2555d537f509ae3f05.tar.gz
lua-cjson-31bf122c1d1d9e3812b9ef2555d537f509ae3f05.tar.bz2
lua-cjson-31bf122c1d1d9e3812b9ef2555d537f509ae3f05.zip
Simplify string.format() calls
Simply string.format() calls with OO method notation.
Diffstat (limited to 'tests/bench.lua')
-rwxr-xr-xtests/bench.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/bench.lua b/tests/bench.lua
index cae4902..648020b 100755
--- a/tests/bench.lua
+++ b/tests/bench.lua
@@ -115,7 +115,7 @@ function bench_file(filename)
115end 115end
116 116
117-- Optionally load any custom configuration required for this module 117-- Optionally load any custom configuration required for this module
118local success, data = pcall(util.file_load, string.format("bench-%s.lua", json_module)) 118local success, data = pcall(util.file_load, ("bench-%s.lua"):format(json_module))
119if success then 119if success then
120 util.run_script(data, _G) 120 util.run_script(data, _G)
121 configure(json) 121 configure(json)
@@ -124,7 +124,7 @@ end
124for i = 1, #arg do 124for i = 1, #arg do
125 local results = bench_file(arg[i]) 125 local results = bench_file(arg[i])
126 for k, v in pairs(results) do 126 for k, v in pairs(results) do
127 print(string.format("%s\t%s\t%d", arg[i], k, v)) 127 print(("%s\t%s\t%d"):format(arg[i], k, v))
128 end 128 end
129end 129end
130 130