| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
package org.qedeq.kernel.bo.service; |
| 16 |
|
|
| 17 |
|
import org.qedeq.base.test.QedeqTestCase; |
| 18 |
|
import org.qedeq.kernel.base.module.FunctionDefinition; |
| 19 |
|
import org.qedeq.kernel.base.module.PredicateDefinition; |
| 20 |
|
import org.qedeq.kernel.bo.context.KernelContext; |
| 21 |
|
import org.qedeq.kernel.bo.logic.wf.ExistenceChecker; |
| 22 |
|
import org.qedeq.kernel.bo.logic.wf.Function; |
| 23 |
|
import org.qedeq.kernel.bo.logic.wf.Predicate; |
| 24 |
|
import org.qedeq.kernel.bo.test.KernelFacade; |
| 25 |
|
import org.qedeq.kernel.common.DefaultModuleAddress; |
| 26 |
|
import org.qedeq.kernel.common.ModuleAddress; |
| 27 |
|
import org.qedeq.kernel.common.SourceFileExceptionList; |
| 28 |
|
|
| 29 |
|
|
| 30 |
|
|
| 31 |
|
|
| 32 |
|
@author |
| 33 |
|
|
|
|
|
| 88.1% |
Uncovered Elements: 24 (201) |
Complexity: 22 |
Complexity Density: 0.13 |
|
| 34 |
|
public class ModuleConstantsExistenceCheckerTest extends QedeqTestCase { |
| 35 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 36 |
9
|
protected void setUp() throws Exception {... |
| 37 |
9
|
super.setUp(); |
| 38 |
9
|
KernelFacade.startup(); |
| 39 |
|
} |
| 40 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
| 41 |
9
|
protected void tearDown() throws Exception {... |
| 42 |
9
|
KernelFacade.shutdown(); |
| 43 |
9
|
super.tearDown(); |
| 44 |
|
} |
| 45 |
|
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 46 |
0
|
public ModuleConstantsExistenceCheckerTest() {... |
| 47 |
0
|
super(); |
| 48 |
|
} |
| 49 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 50 |
9
|
public ModuleConstantsExistenceCheckerTest(final String name) {... |
| 51 |
9
|
super(name); |
| 52 |
|
} |
| 53 |
|
|
| 54 |
|
|
| 55 |
|
|
| 56 |
|
|
| 57 |
|
|
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
@throws |
| 63 |
|
|
|
|
|
| 72.7% |
Uncovered Elements: 3 (11) |
Complexity: 2 |
Complexity Density: 0.22 |
1
PASS
|
|
| 64 |
1
|
public void testModuleConstancsExistenceChecker_01() throws Exception {... |
| 65 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC011.xml")); |
| 66 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 67 |
0
|
KernelContext.getInstance().getQedeqBo(address).getErrors().printStackTrace(System.out); |
| 68 |
0
|
throw KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 69 |
|
} |
| 70 |
1
|
final DefaultKernelQedeqBo qedeq = (DefaultKernelQedeqBo) KernelContext.getInstance().getQedeqBo(address); |
| 71 |
1
|
SourceFileExceptionList errors = qedeq.getErrors(); |
| 72 |
1
|
SourceFileExceptionList warnings = qedeq.getWarnings(); |
| 73 |
1
|
assertNull(warnings); |
| 74 |
1
|
assertNull(errors); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
|
| 82 |
|
|
| 83 |
|
|
| 84 |
|
|
| 85 |
|
@throws |
| 86 |
|
|
|
|
|
| 83.3% |
Uncovered Elements: 2 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
1
PASS
|
|
| 87 |
1
|
public void testModuleConstancsExistenceChecker_02() throws Exception {... |
| 88 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC021.xml")); |
| 89 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 90 |
1
|
SourceFileExceptionList errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 91 |
1
|
SourceFileExceptionList warnings = KernelContext.getInstance().getQedeqBo(address).getWarnings(); |
| 92 |
1
|
assertNull(warnings); |
| 93 |
1
|
assertEquals(1, errors.size()); |
| 94 |
1
|
assertEquals(123476, errors.get(0).getErrorCode()); |
| 95 |
1
|
assertEquals(38, errors.get(0).getSourceArea().getStartPosition().getRow()); |
| 96 |
1
|
assertEquals(15, errors.get(0).getSourceArea().getStartPosition().getColumn()); |
| 97 |
|
} else { |
| 98 |
0
|
fail("failure for double definition of identity operator expected"); |
| 99 |
|
} |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
|
| 103 |
|
|
| 104 |
|
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 109 |
|
|
| 110 |
|
@throws |
| 111 |
|
|
|
|
|
| 83.3% |
Uncovered Elements: 2 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
1
PASS
|
|
| 112 |
1
|
public void testModuleConstancsExistenceChecker_03() throws Exception {... |
| 113 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC031.xml")); |
| 114 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 115 |
1
|
SourceFileExceptionList errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 116 |
1
|
SourceFileExceptionList warnings = KernelContext.getInstance().getQedeqBo(address).getWarnings(); |
| 117 |
1
|
assertNull(warnings); |
| 118 |
1
|
assertEquals(1, errors.size()); |
| 119 |
1
|
assertEquals(123476, errors.get(0).getErrorCode()); |
| 120 |
1
|
assertEquals(38, errors.get(0).getSourceArea().getStartPosition().getRow()); |
| 121 |
1
|
assertEquals(15, errors.get(0).getSourceArea().getStartPosition().getColumn()); |
| 122 |
|
} else { |
| 123 |
0
|
fail("failure for double definition of identity operator expected"); |
| 124 |
|
} |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
|
| 128 |
|
|
| 129 |
|
|
| 130 |
|
|
| 131 |
|
|
| 132 |
|
|
| 133 |
|
|
| 134 |
|
|
| 135 |
|
@throws |
| 136 |
|
|
|
|
|
| 72.7% |
Uncovered Elements: 3 (11) |
Complexity: 2 |
Complexity Density: 0.22 |
1
PASS
|
|
| 137 |
1
|
public void testModuleConstancsExistenceChecker_04() throws Exception {... |
| 138 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC041.xml")); |
| 139 |
1
|
SourceFileExceptionList errors; |
| 140 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 141 |
0
|
errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 142 |
0
|
throw errors; |
| 143 |
|
} |
| 144 |
1
|
errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 145 |
1
|
SourceFileExceptionList warnings = KernelContext.getInstance().getQedeqBo(address).getWarnings(); |
| 146 |
1
|
assertNull(warnings); |
| 147 |
1
|
assertNull(errors); |
| 148 |
|
} |
| 149 |
|
|
| 150 |
|
|
| 151 |
|
|
| 152 |
|
|
| 153 |
|
|
| 154 |
|
|
| 155 |
|
|
| 156 |
|
|
| 157 |
|
@throws |
| 158 |
|
|
|
|
|
| 95.5% |
Uncovered Elements: 3 (67) |
Complexity: 2 |
Complexity Density: 0.03 |
1
PASS
|
|
| 159 |
1
|
public void testModuleConstancsExistenceChecker_05() throws Exception {... |
| 160 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC051.xml")); |
| 161 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 162 |
0
|
KernelContext.getInstance().getQedeqBo(address).getErrors().printStackTrace(System.out); |
| 163 |
0
|
throw KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 164 |
|
} |
| 165 |
1
|
final DefaultKernelQedeqBo qedeq = (DefaultKernelQedeqBo) KernelContext.getInstance().getQedeqBo(address); |
| 166 |
1
|
SourceFileExceptionList errors = qedeq.getErrors(); |
| 167 |
1
|
SourceFileExceptionList warnings = qedeq.getWarnings(); |
| 168 |
1
|
assertNull(warnings); |
| 169 |
1
|
assertNull(errors); |
| 170 |
|
|
| 171 |
1
|
ModuleConstantsExistenceChecker checker = qedeq.getExistenceChecker(); |
| 172 |
|
|
| 173 |
1
|
assertEquals("MCEC052.equal", checker.getIdentityOperator()); |
| 174 |
1
|
assertFalse(qedeq.equals(checker.getQedeq(new Predicate(ExistenceChecker.NAME_EQUAL, "" + 2)))); |
| 175 |
1
|
assertNull(checker.getQedeq(new Predicate(ExistenceChecker.NAME_EQUAL, "" + 2))); |
| 176 |
1
|
assertNull(checker.getQedeq(new Predicate("unknown." + ExistenceChecker.NAME_EQUAL, "" + 2))); |
| 177 |
1
|
assertEquals(KernelContext.getInstance().getQedeqBo(new DefaultModuleAddress(getFile("existence/MCEC052.xml"))), |
| 178 |
|
checker.getQedeq(new Predicate("MCEC052." + ExistenceChecker.NAME_EQUAL, "" + 2))); |
| 179 |
|
{ |
| 180 |
1
|
final Predicate predicate = new Predicate("MCEC052." + ExistenceChecker.NAME_EQUAL, "" + 2); |
| 181 |
1
|
assertTrue(checker.predicateExists(predicate)); |
| 182 |
1
|
final PredicateDefinition def = checker.get(predicate); |
| 183 |
1
|
assertEquals("#1 \\ = \\ #2", def.getLatexPattern()); |
| 184 |
1
|
assertEquals("" + 2, def.getArgumentNumber()); |
| 185 |
1
|
assertNull(def.getFormula()); |
| 186 |
1
|
assertEquals("equal", def.getName()); |
| 187 |
1
|
assertEquals(2, def.getVariableList().size()); |
| 188 |
|
} |
| 189 |
|
|
| 190 |
|
{ |
| 191 |
1
|
assertTrue(checker.predicateExists("MCEC052." + ExistenceChecker.NAME_EQUAL, 2)); |
| 192 |
1
|
final PredicateDefinition def = checker.getPredicate("MCEC052." + ExistenceChecker.NAME_EQUAL, 2); |
| 193 |
1
|
assertEquals("#1 \\ = \\ #2", def.getLatexPattern()); |
| 194 |
1
|
assertEquals("" + 2, def.getArgumentNumber()); |
| 195 |
1
|
assertNull(def.getFormula()); |
| 196 |
1
|
assertEquals("equal", def.getName()); |
| 197 |
1
|
assertEquals(2, def.getVariableList().size()); |
| 198 |
|
} |
| 199 |
|
|
| 200 |
|
{ |
| 201 |
1
|
final Predicate predicate = new Predicate("MCEC052x." + ExistenceChecker.NAME_EQUAL, "" + 2); |
| 202 |
1
|
assertFalse(checker.predicateExists(predicate)); |
| 203 |
1
|
final PredicateDefinition def = checker.get(predicate); |
| 204 |
1
|
assertNull(def); |
| 205 |
|
} |
| 206 |
|
|
| 207 |
|
{ |
| 208 |
1
|
assertFalse(checker.predicateExists("MCEC052x." + ExistenceChecker.NAME_EQUAL, 2)); |
| 209 |
1
|
final PredicateDefinition def = checker.getPredicate("MCEC052x." + ExistenceChecker.NAME_EQUAL, 2); |
| 210 |
1
|
assertNull(def); |
| 211 |
|
} |
| 212 |
|
|
| 213 |
1
|
assertEquals("MCEC052.equal", checker.getIdentityOperator()); |
| 214 |
1
|
assertFalse(qedeq.equals(checker.getQedeq(new Function("union", "" + 2)))); |
| 215 |
1
|
assertNull(checker.getQedeq(new Function("union", "" + 2))); |
| 216 |
1
|
assertNull(checker.getQedeq(new Function("unknown." + "union", "" + 2))); |
| 217 |
1
|
assertEquals(KernelContext.getInstance().getQedeqBo(new DefaultModuleAddress(getFile("existence/MCEC052.xml"))), |
| 218 |
|
checker.getQedeq(new Function("MCEC052." + "union", "" + 2))); |
| 219 |
|
{ |
| 220 |
1
|
final Function function = new Function("MCEC052x." + "union", "" + 2); |
| 221 |
1
|
assertFalse(checker.functionExists(function)); |
| 222 |
1
|
assertNull(checker.get(function)); |
| 223 |
|
} |
| 224 |
|
{ |
| 225 |
1
|
final Function function = new Function("MCEC05." + "union", "" + 2); |
| 226 |
1
|
assertFalse(checker.functionExists(function)); |
| 227 |
1
|
assertNull(checker.get(function)); |
| 228 |
|
} |
| 229 |
|
{ |
| 230 |
1
|
final Function function = new Function("MCEC052." + "uniont", "" + 2); |
| 231 |
1
|
assertFalse(checker.functionExists(function)); |
| 232 |
1
|
assertNull(checker.get(function)); |
| 233 |
|
} |
| 234 |
|
{ |
| 235 |
1
|
final Function function = new Function("MCEC052." + "union", "" + 2); |
| 236 |
1
|
assertTrue(checker.functionExists(function)); |
| 237 |
1
|
final FunctionDefinition def2 = checker.get(function); |
| 238 |
1
|
assertEquals("(#1 \\cup #2)", def2.getLatexPattern()); |
| 239 |
1
|
assertEquals("" + 2, def2.getArgumentNumber()); |
| 240 |
1
|
assertEquals("CLASS ( VAR ( \"z\"), OR ( PREDCON ( \"in\", VAR ( \"z\"), VAR ( \"x\"))," |
| 241 |
|
+ " PREDCON ( \"in\", VAR ( \"z\"), VAR ( \"y\"))))", def2.getTerm().toString()); |
| 242 |
1
|
assertEquals("union", def2.getName()); |
| 243 |
|
} |
| 244 |
|
{ |
| 245 |
1
|
assertTrue(checker.functionExists("MCEC052." + "union", 2)); |
| 246 |
1
|
final FunctionDefinition def3 = checker.getFunction("MCEC052." + "union", 2); |
| 247 |
1
|
assertEquals("(#1 \\cup #2)", def3.getLatexPattern()); |
| 248 |
1
|
assertEquals("" + 2, def3.getArgumentNumber()); |
| 249 |
1
|
assertEquals("CLASS ( VAR ( \"z\"), OR ( PREDCON ( \"in\", VAR ( \"z\"), VAR ( \"x\"))," |
| 250 |
|
+ " PREDCON ( \"in\", VAR ( \"z\"), VAR ( \"y\"))))", def3.getTerm().toString()); |
| 251 |
1
|
assertEquals("union", def3.getName()); |
| 252 |
|
} |
| 253 |
|
{ |
| 254 |
1
|
assertFalse(checker.functionExists("MCEC052x." + "union", 2)); |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
} |
| 258 |
|
|
| 259 |
|
|
| 260 |
|
|
| 261 |
|
|
| 262 |
|
|
| 263 |
|
|
| 264 |
|
|
| 265 |
|
|
| 266 |
|
|
| 267 |
|
@throws |
| 268 |
|
|
|
|
|
| 90.9% |
Uncovered Elements: 3 (33) |
Complexity: 2 |
Complexity Density: 0.06 |
1
PASS
|
|
| 269 |
1
|
public void testModuleConstancsExistenceChecker_06() throws Exception {... |
| 270 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC061.xml")); |
| 271 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 272 |
0
|
KernelContext.getInstance().getQedeqBo(address).getErrors().printStackTrace(System.out); |
| 273 |
0
|
throw KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 274 |
|
} |
| 275 |
1
|
final DefaultKernelQedeqBo qedeq = (DefaultKernelQedeqBo) KernelContext.getInstance().getQedeqBo(address); |
| 276 |
1
|
SourceFileExceptionList errors = qedeq.getErrors(); |
| 277 |
1
|
SourceFileExceptionList warnings = qedeq.getWarnings(); |
| 278 |
1
|
assertNull(warnings); |
| 279 |
1
|
assertNull(errors); |
| 280 |
|
|
| 281 |
1
|
ModuleConstantsExistenceChecker checker = qedeq.getExistenceChecker(); |
| 282 |
|
|
| 283 |
1
|
assertEquals("MCEC062a.equal", checker.getIdentityOperator()); |
| 284 |
1
|
assertFalse(qedeq.equals(checker.getQedeq(new Predicate(ExistenceChecker.NAME_EQUAL, "" + 2)))); |
| 285 |
1
|
assertNull(checker.getQedeq(new Predicate(ExistenceChecker.NAME_EQUAL, "" + 2))); |
| 286 |
1
|
assertNull(checker.getQedeq(new Predicate("unknown." + ExistenceChecker.NAME_EQUAL, "" + 2))); |
| 287 |
1
|
assertEquals(KernelContext.getInstance().getQedeqBo(new DefaultModuleAddress(getFile("existence/MCEC062.xml"))), |
| 288 |
|
checker.getQedeq(new Predicate("MCEC062a." + ExistenceChecker.NAME_EQUAL, "" + 2))); |
| 289 |
1
|
final PredicateDefinition def = checker.get(new Predicate("MCEC062a." + ExistenceChecker.NAME_EQUAL, "" + 2)); |
| 290 |
1
|
assertEquals("#1 \\ = \\ #2", def.getLatexPattern()); |
| 291 |
1
|
assertEquals("" + 2, def.getArgumentNumber()); |
| 292 |
1
|
assertNull(def.getFormula()); |
| 293 |
1
|
assertEquals("equal", def.getName()); |
| 294 |
1
|
assertEquals(2, def.getVariableList().size()); |
| 295 |
|
|
| 296 |
1
|
assertEquals("MCEC062a.equal", checker.getIdentityOperator()); |
| 297 |
1
|
assertFalse(qedeq.equals(checker.getQedeq(new Function("union", "" + 2)))); |
| 298 |
1
|
assertNull(checker.getQedeq(new Function("union", "" + 2))); |
| 299 |
1
|
assertNull(checker.getQedeq(new Function("unknown." + "union", "" + 2))); |
| 300 |
1
|
assertEquals(KernelContext.getInstance().getQedeqBo(new DefaultModuleAddress(getFile("existence/MCEC062.xml"))), |
| 301 |
|
checker.getQedeq(new Function("MCEC062a." + "union", "" + 2))); |
| 302 |
1
|
final FunctionDefinition def2 = checker.get(new Function("MCEC062a." + "union", "" + 2)); |
| 303 |
1
|
assertEquals("(#1 \\cup #2)", def2.getLatexPattern()); |
| 304 |
1
|
assertEquals("" + 2, def2.getArgumentNumber()); |
| 305 |
1
|
assertEquals("CLASS ( VAR ( \"z\"), OR ( PREDCON ( \"in\", VAR ( \"z\"), VAR ( \"x\"))," |
| 306 |
|
+ " PREDCON ( \"in\", VAR ( \"z\"), VAR ( \"y\"))))", def2.getTerm().toString()); |
| 307 |
1
|
assertEquals("union", def2.getName()); |
| 308 |
|
|
| 309 |
|
} |
| 310 |
|
|
| 311 |
|
|
| 312 |
|
|
| 313 |
|
|
| 314 |
|
|
| 315 |
|
|
| 316 |
|
|
| 317 |
|
|
| 318 |
|
|
| 319 |
|
@throws |
| 320 |
|
|
|
|
|
| 83.3% |
Uncovered Elements: 2 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
1
PASS
|
|
| 321 |
1
|
public void testModuleConstancsExistenceChecker_07() throws Exception {... |
| 322 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC071.xml")); |
| 323 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 324 |
1
|
SourceFileExceptionList errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 325 |
1
|
SourceFileExceptionList warnings = KernelContext.getInstance().getQedeqBo(address).getWarnings(); |
| 326 |
1
|
assertNull(warnings); |
| 327 |
1
|
assertEquals(1, errors.size()); |
| 328 |
1
|
assertEquals(123478, errors.get(0).getErrorCode()); |
| 329 |
1
|
assertEquals(38, errors.get(0).getSourceArea().getStartPosition().getRow()); |
| 330 |
1
|
assertEquals(15, errors.get(0).getSourceArea().getStartPosition().getColumn()); |
| 331 |
|
} else { |
| 332 |
0
|
fail("failure for double definition of class operator expected"); |
| 333 |
|
} |
| 334 |
|
} |
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| 340 |
|
|
| 341 |
|
|
| 342 |
|
|
| 343 |
|
@throws |
| 344 |
|
|
|
|
|
| 83.3% |
Uncovered Elements: 2 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
1
PASS
|
|
| 345 |
1
|
public void testModuleConstancsExistenceChecker_08() throws Exception {... |
| 346 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC081.xml")); |
| 347 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 348 |
1
|
SourceFileExceptionList errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 349 |
1
|
SourceFileExceptionList warnings = KernelContext.getInstance().getQedeqBo(address).getWarnings(); |
| 350 |
1
|
assertNull(warnings); |
| 351 |
1
|
assertEquals(1, errors.size()); |
| 352 |
1
|
assertEquals(123478, errors.get(0).getErrorCode()); |
| 353 |
1
|
assertEquals(118, errors.get(0).getSourceArea().getStartPosition().getRow()); |
| 354 |
1
|
assertEquals(11, errors.get(0).getSourceArea().getStartPosition().getColumn()); |
| 355 |
|
} else { |
| 356 |
0
|
fail("failure for double definition of class operator expected"); |
| 357 |
|
} |
| 358 |
|
} |
| 359 |
|
|
| 360 |
|
|
| 361 |
|
|
| 362 |
|
|
| 363 |
|
|
| 364 |
|
|
| 365 |
|
|
| 366 |
|
|
| 367 |
|
@throws |
| 368 |
|
|
|
|
|
| 83.3% |
Uncovered Elements: 2 (12) |
Complexity: 2 |
Complexity Density: 0.2 |
1
PASS
|
|
| 369 |
1
|
public void testModuleConstancsExistenceChecker_09() throws Exception {... |
| 370 |
1
|
final ModuleAddress address = new DefaultModuleAddress(getFile("existence/MCEC091.xml")); |
| 371 |
1
|
if (!KernelContext.getInstance().checkModule(address)) { |
| 372 |
1
|
SourceFileExceptionList errors = KernelContext.getInstance().getQedeqBo(address).getErrors(); |
| 373 |
1
|
SourceFileExceptionList warnings = KernelContext.getInstance().getQedeqBo(address).getWarnings(); |
| 374 |
1
|
assertNull(warnings); |
| 375 |
1
|
assertEquals(1, errors.size()); |
| 376 |
1
|
assertEquals(123476, errors.get(0).getErrorCode()); |
| 377 |
1
|
assertEquals(125, errors.get(0).getSourceArea().getStartPosition().getRow()); |
| 378 |
1
|
assertEquals(11, errors.get(0).getSourceArea().getStartPosition().getColumn()); |
| 379 |
|
} else { |
| 380 |
0
|
fail("failure for double definition of class operator expected"); |
| 381 |
|
} |
| 382 |
|
} |
| 383 |
|
|
| 384 |
|
} |