Skip to content

Commit 393ab0d

Browse files
committed
printing format change
1 parent f49914b commit 393ab0d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_function_data.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,11 @@ end
209209
end
210210

211211
@testset "Test FunctionData printing" begin
212+
type_prefix = @static VERSION >= v"1.12" ? "" : "@NamedTuple{x::Float64, y::Float64}"
212213
repr_answers = [
213214
"InfrastructureSystems.LinearFunctionData(5.0, 1.0)",
214215
"InfrastructureSystems.QuadraticFunctionData(2.0, 3.0, 4.0)",
215-
"InfrastructureSystems.PiecewiseLinearData(@NamedTuple{x::Float64, y::Float64}[(x = 1.0, y = 1.0), (x = 3.0, y = 5.0), (x = 5.0, y = 10.0)])",
216+
"InfrastructureSystems.PiecewiseLinearData($(type_prefix)[(x = 1.0, y = 1.0), (x = 3.0, y = 5.0), (x = 5.0, y = 10.0)])",
216217
"InfrastructureSystems.PiecewiseStepData([1.0, 3.0, 5.0], [2.0, 2.5])",
217218
]
218219
plain_answers = [

0 commit comments

Comments
 (0)