changeset 588 | 89e29e22d479 |
parent 485 | 9b082b3fb33f |
child 589 | fc6c7aab4b8d |
3:613d026bd0ad | 6:31604c71f127 |
---|---|
104 |
104 |
105 |
105 |
106 |
106 |
107 } |
107 } |
108 |
108 |
109 template<class MIP> |
|
110 void cloneTest() |
|
111 { |
|
112 |
|
113 MIP* mip = new MIP(); |
|
114 MIP* mipnew = mip->newSolver(); |
|
115 MIP* mipclone = mip->cloneSolver(); |
|
116 delete mip; |
|
117 delete mipnew; |
|
118 delete mipclone; |
|
119 } |
|
109 |
120 |
110 int main() |
121 int main() |
111 { |
122 { |
112 |
123 |
113 #ifdef HAVE_GLPK |
124 #ifdef HAVE_GLPK |
114 { |
125 { |
115 GlpkMip mip1; |
126 GlpkMip mip1; |
116 aTest(mip1); |
127 aTest(mip1); |
128 cloneTest<GlpkMip>(); |
|
117 } |
129 } |
118 #endif |
130 #endif |
119 |
131 |
120 #ifdef HAVE_CPLEX |
132 #ifdef HAVE_CPLEX |
121 try { |
133 try { |
127 #else |
139 #else |
128 std::cerr << error.what() << std::endl; |
140 std::cerr << error.what() << std::endl; |
129 std::cerr << "Cplex license check failed, lp check skipped" << std::endl; |
141 std::cerr << "Cplex license check failed, lp check skipped" << std::endl; |
130 #endif |
142 #endif |
131 } |
143 } |
144 cloneTest<CplexMip>(); |
|
132 #endif |
145 #endif |
133 |
146 |
134 return 0; |
147 return 0; |
135 |
148 |
136 } |
149 } |