Implement parse_name

This commit is contained in:
2021-08-20 06:32:48 -05:00
parent 987f410520
commit e22e27fac1
3 changed files with 33 additions and 0 deletions

12
test/utils/parse_test.jl Normal file
View File

@@ -0,0 +1,12 @@
# MIPLearn: Extensible Framework for Learning-Enhanced Mixed-Integer Optimization
# Copyright (C) 2020-2021, UChicago Argonne, LLC. All rights reserved.
# Released under the modified BSD license. See COPYING.md for more details.
using MIPLearn
@testset "Parse" begin
@test MIPLearn.parse_name("x") == ["x"]
@test MIPLearn.parse_name("x[3]") == ["x", "3"]
@test MIPLearn.parse_name("test_eq[x]") == ["test_eq", "x"]
@test MIPLearn.parse_name("test_eq[x,y,z]") == ["test_eq", "x", "y", "z"]
end