| 1 |
|
|
| 2 |
|
|
| 3 |
|
|
| 4 |
|
|
| 5 |
|
|
| 6 |
|
|
| 7 |
|
|
| 8 |
|
|
| 9 |
|
|
| 10 |
|
|
| 11 |
|
|
| 12 |
|
|
| 13 |
|
|
| 14 |
|
|
| 15 |
|
|
| 16 |
|
package org.qedeq.kernel.bo.logic.wf; |
| 17 |
|
|
| 18 |
|
import org.qedeq.kernel.base.list.Element; |
| 19 |
|
import org.qedeq.kernel.bo.logic.FormulaChecker; |
| 20 |
|
import org.qedeq.kernel.common.DefaultModuleAddress; |
| 21 |
|
import org.qedeq.kernel.common.ModuleContext; |
| 22 |
|
|
| 23 |
|
|
| 24 |
|
@link |
| 25 |
|
|
| 26 |
|
|
| 27 |
|
@version |
| 28 |
|
@author |
| 29 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (124) |
Complexity: 26 |
Complexity Density: 0.27 |
|
| 30 |
|
public class FormulaCheckerLogicalConnectivesTest extends AbstractFormulaChecker { |
| 31 |
|
|
| 32 |
|
private ModuleContext context; |
| 33 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 34 |
24
|
protected void setUp() throws Exception {... |
| 35 |
24
|
context = new ModuleContext(new DefaultModuleAddress("http://memory.org/sample.xml"), "getElement()"); |
| 36 |
|
} |
| 37 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
| 38 |
24
|
protected void tearDown() throws Exception {... |
| 39 |
24
|
context = null; |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
|
| 44 |
|
|
| 45 |
|
|
| 46 |
|
|
| 47 |
|
@throws |
| 48 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 49 |
1
|
public void testLogicalConnectivePositive01() throws Exception {... |
| 50 |
1
|
final Element ele = TestParser.createElement( |
| 51 |
|
"<AND><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></AND>"); |
| 52 |
|
|
| 53 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 54 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 55 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 56 |
|
.hasErrors()); |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
|
| 60 |
|
|
| 61 |
|
|
| 62 |
|
|
| 63 |
|
|
| 64 |
|
@throws |
| 65 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 66 |
1
|
public void testLogicalConnectivePositive02() throws Exception {... |
| 67 |
1
|
final Element ele = TestParser.createElement( |
| 68 |
|
"<OR><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></OR>"); |
| 69 |
|
|
| 70 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 71 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 72 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 73 |
|
.hasErrors()); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
|
| 77 |
|
|
| 78 |
|
|
| 79 |
|
|
| 80 |
|
|
| 81 |
|
@throws |
| 82 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 83 |
1
|
public void testLogicalConnectivePositive03() throws Exception {... |
| 84 |
1
|
final Element ele = TestParser.createElement( |
| 85 |
|
"<IMPL><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></IMPL>"); |
| 86 |
|
|
| 87 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 88 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 89 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 90 |
|
.hasErrors()); |
| 91 |
|
} |
| 92 |
|
|
| 93 |
|
|
| 94 |
|
|
| 95 |
|
|
| 96 |
|
|
| 97 |
|
|
| 98 |
|
@throws |
| 99 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 100 |
1
|
public void testLogicalConnectivePositive04() throws Exception {... |
| 101 |
1
|
final Element ele = TestParser.createElement( |
| 102 |
|
"<EQUI><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/></EQUI>"); |
| 103 |
|
|
| 104 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 105 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 106 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 107 |
|
.hasErrors()); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
|
| 111 |
|
|
| 112 |
|
|
| 113 |
|
|
| 114 |
|
|
| 115 |
|
@throws |
| 116 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 117 |
1
|
public void testLogicalConnectivePositive05() throws Exception {... |
| 118 |
1
|
final Element ele = TestParser.createElement( |
| 119 |
|
"<AND><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></AND>"); |
| 120 |
|
|
| 121 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 122 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 123 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 124 |
|
.hasErrors()); |
| 125 |
|
} |
| 126 |
|
|
| 127 |
|
|
| 128 |
|
|
| 129 |
|
|
| 130 |
|
|
| 131 |
|
|
| 132 |
|
@throws |
| 133 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 134 |
1
|
public void testLogicalConnectivePositive06() throws Exception {... |
| 135 |
1
|
final Element ele = TestParser.createElement( |
| 136 |
|
"<OR><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></OR>"); |
| 137 |
|
|
| 138 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 139 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 140 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 141 |
|
.hasErrors()); |
| 142 |
|
} |
| 143 |
|
|
| 144 |
|
|
| 145 |
|
|
| 146 |
|
|
| 147 |
|
|
| 148 |
|
|
| 149 |
|
@throws |
| 150 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 151 |
1
|
public void testLogicalConnectivePositive07() throws Exception {... |
| 152 |
1
|
final Element ele = TestParser.createElement( |
| 153 |
|
"<EQUI><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></EQUI>"); |
| 154 |
|
|
| 155 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context).hasErrors()); |
| 156 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getChecker()).hasErrors()); |
| 157 |
1
|
assertFalse(FormulaChecker.checkFormula(ele, context, getCheckerWithoutClass()) |
| 158 |
|
.hasErrors()); |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
|
| 162 |
|
|
| 163 |
|
|
| 164 |
|
|
| 165 |
|
|
| 166 |
|
@throws |
| 167 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 168 |
1
|
public void testLogicalConnectiveNegative01() throws Exception {... |
| 169 |
1
|
final Element ele = TestParser.createElement("<AND />"); |
| 170 |
|
|
| 171 |
1
|
LogicalCheckExceptionList list = |
| 172 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 173 |
1
|
assertEquals(1, list.size()); |
| 174 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 175 |
|
} |
| 176 |
|
|
| 177 |
|
|
| 178 |
|
|
| 179 |
|
|
| 180 |
|
|
| 181 |
|
|
| 182 |
|
@throws |
| 183 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 184 |
1
|
public void testLogicalConnectiveNegative02() throws Exception {... |
| 185 |
1
|
final Element ele = TestParser.createElement("<OR />"); |
| 186 |
|
|
| 187 |
1
|
LogicalCheckExceptionList list = |
| 188 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 189 |
1
|
assertEquals(1, list.size()); |
| 190 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
|
| 194 |
|
|
| 195 |
|
|
| 196 |
|
|
| 197 |
|
|
| 198 |
|
@throws |
| 199 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 200 |
1
|
public void testLogicalConnectiveNegative03() throws Exception {... |
| 201 |
1
|
final Element ele = TestParser.createElement("<IMPL />"); |
| 202 |
|
|
| 203 |
1
|
LogicalCheckExceptionList list = |
| 204 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 205 |
1
|
assertEquals(1, list.size()); |
| 206 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 207 |
|
} |
| 208 |
|
|
| 209 |
|
|
| 210 |
|
|
| 211 |
|
|
| 212 |
|
|
| 213 |
|
|
| 214 |
|
@throws |
| 215 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 216 |
1
|
public void testLogicalConnectiveNegative04() throws Exception {... |
| 217 |
1
|
final Element ele = TestParser.createElement("<EQUI />"); |
| 218 |
|
|
| 219 |
1
|
LogicalCheckExceptionList list = |
| 220 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 221 |
1
|
assertEquals(1, list.size()); |
| 222 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 223 |
|
} |
| 224 |
|
|
| 225 |
|
|
| 226 |
|
|
| 227 |
|
|
| 228 |
|
|
| 229 |
|
|
| 230 |
|
@throws |
| 231 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 232 |
1
|
public void testLogicalConnectiveNegative05() throws Exception {... |
| 233 |
1
|
final Element ele = TestParser.createElement("<AND><PREDVAR id=\"A\"/></AND>"); |
| 234 |
|
|
| 235 |
1
|
LogicalCheckExceptionList list = |
| 236 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 237 |
1
|
assertEquals(1, list.size()); |
| 238 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 239 |
|
} |
| 240 |
|
|
| 241 |
|
|
| 242 |
|
|
| 243 |
|
|
| 244 |
|
|
| 245 |
|
|
| 246 |
|
@throws |
| 247 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 248 |
1
|
public void testLogicalConnectiveNegative06() throws Exception {... |
| 249 |
1
|
final Element ele = TestParser.createElement("<OR><PREDVAR id=\"A\"/></OR>"); |
| 250 |
|
|
| 251 |
1
|
LogicalCheckExceptionList list = |
| 252 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 253 |
1
|
assertEquals(1, list.size()); |
| 254 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
|
| 258 |
|
|
| 259 |
|
|
| 260 |
|
|
| 261 |
|
|
| 262 |
|
@throws |
| 263 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 264 |
1
|
public void testLogicalConnectiveNegative07() throws Exception {... |
| 265 |
1
|
final Element ele = TestParser.createElement("<IMPL><PREDVAR id=\"A\"/></IMPL>"); |
| 266 |
|
|
| 267 |
1
|
LogicalCheckExceptionList list = |
| 268 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 269 |
1
|
assertEquals(1, list.size()); |
| 270 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 271 |
|
} |
| 272 |
|
|
| 273 |
|
|
| 274 |
|
|
| 275 |
|
|
| 276 |
|
|
| 277 |
|
|
| 278 |
|
@throws |
| 279 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 280 |
1
|
public void testLogicalConnectiveNegative08() throws Exception {... |
| 281 |
1
|
final Element ele = TestParser.createElement("<EQUI><PREDVAR id=\"A\"/></EQUI>"); |
| 282 |
|
|
| 283 |
1
|
LogicalCheckExceptionList list = |
| 284 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 285 |
1
|
assertEquals(1, list.size()); |
| 286 |
1
|
assertEquals(30740, list.get(0).getErrorCode()); |
| 287 |
|
} |
| 288 |
|
|
| 289 |
|
|
| 290 |
|
|
| 291 |
|
|
| 292 |
|
|
| 293 |
|
|
| 294 |
|
@throws |
| 295 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 296 |
1
|
public void testLogicalConnectiveNegative09() throws Exception {... |
| 297 |
1
|
final Element ele = TestParser.createElement( |
| 298 |
|
"<IMPL><PREDVAR id=\"A\"/><PREDVAR id=\"B\"/><PREDVAR id=\"C\"/></IMPL>"); |
| 299 |
|
|
| 300 |
1
|
LogicalCheckExceptionList list = |
| 301 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 302 |
1
|
assertEquals(1, list.size()); |
| 303 |
1
|
assertEquals(30760, list.get(0).getErrorCode()); |
| 304 |
|
} |
| 305 |
|
|
| 306 |
|
|
| 307 |
|
|
| 308 |
|
|
| 309 |
|
|
| 310 |
|
|
| 311 |
|
@throws |
| 312 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 313 |
1
|
public void testLogicalConnectiveNegative10() throws Exception {... |
| 314 |
1
|
final Element ele = TestParser.createElement( |
| 315 |
|
"<AND>" + |
| 316 |
|
"<PREDVAR id=\"equal\">" + |
| 317 |
|
"<VAR id=\"x\" />" + |
| 318 |
|
"<VAR id=\"x\" />" + |
| 319 |
|
"</PREDVAR>" + |
| 320 |
|
"<PREDVAR id=\"equal\">" + |
| 321 |
|
"<VAR id=\"y\" />" + |
| 322 |
|
"<CLASS>" + |
| 323 |
|
"<VAR id=\"x\" />" + |
| 324 |
|
"<PREDVAR id=\"phi\" />" + |
| 325 |
|
"</CLASS>" + |
| 326 |
|
"</PREDVAR>" + |
| 327 |
|
"</AND>"); |
| 328 |
|
|
| 329 |
1
|
LogicalCheckExceptionList list = |
| 330 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 331 |
1
|
assertEquals(1, list.size()); |
| 332 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
| 333 |
|
} |
| 334 |
|
|
| 335 |
|
|
| 336 |
|
|
| 337 |
|
|
| 338 |
|
|
| 339 |
|
|
| 340 |
|
@throws |
| 341 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 342 |
1
|
public void testLogicalConnectiveNegative11() throws Exception {... |
| 343 |
1
|
final Element ele = TestParser.createElement( |
| 344 |
|
"<AND>" + |
| 345 |
|
"<PREDVAR id=\"equal\">" + |
| 346 |
|
"<VAR id=\"y\" />" + |
| 347 |
|
"<CLASS>" + |
| 348 |
|
"<VAR id=\"x\" />" + |
| 349 |
|
"<PREDVAR id=\"phi\" />" + |
| 350 |
|
"</CLASS>" + |
| 351 |
|
"</PREDVAR>" + |
| 352 |
|
"<PREDVAR id=\"equal\">" + |
| 353 |
|
"<VAR id=\"x\" />" + |
| 354 |
|
"<VAR id=\"x\" />" + |
| 355 |
|
"</PREDVAR>" + |
| 356 |
|
"</AND>"); |
| 357 |
|
|
| 358 |
1
|
LogicalCheckExceptionList list = |
| 359 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 360 |
1
|
assertEquals(1, list.size()); |
| 361 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
| 362 |
|
} |
| 363 |
|
|
| 364 |
|
|
| 365 |
|
|
| 366 |
|
|
| 367 |
|
|
| 368 |
|
|
| 369 |
|
@throws |
| 370 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 371 |
1
|
public void testLogicalConnectiveNegative12() throws Exception {... |
| 372 |
1
|
final Element ele = TestParser.createElement( |
| 373 |
|
"<OR>" + |
| 374 |
|
"<PREDVAR id=\"equal\">" + |
| 375 |
|
"<VAR id=\"x\" />" + |
| 376 |
|
"<VAR id=\"x\" />" + |
| 377 |
|
"</PREDVAR>" + |
| 378 |
|
"<PREDVAR id=\"equal\">" + |
| 379 |
|
"<VAR id=\"y\" />" + |
| 380 |
|
"<CLASS>" + |
| 381 |
|
"<VAR id=\"x\" />" + |
| 382 |
|
"<PREDVAR id=\"phi\" />" + |
| 383 |
|
"</CLASS>" + |
| 384 |
|
"</PREDVAR>" + |
| 385 |
|
"</OR>"); |
| 386 |
|
|
| 387 |
1
|
LogicalCheckExceptionList list = |
| 388 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 389 |
1
|
assertEquals(1, list.size()); |
| 390 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
| 391 |
|
} |
| 392 |
|
|
| 393 |
|
|
| 394 |
|
|
| 395 |
|
|
| 396 |
|
|
| 397 |
|
|
| 398 |
|
@throws |
| 399 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 400 |
1
|
public void testLogicalConnectiveNegative13() throws Exception {... |
| 401 |
1
|
final Element ele = TestParser.createElement( |
| 402 |
|
"<OR>" + |
| 403 |
|
"<PREDVAR id=\"equal\">" + |
| 404 |
|
"<VAR id=\"y\" />" + |
| 405 |
|
"<CLASS>" + |
| 406 |
|
"<VAR id=\"x\" />" + |
| 407 |
|
"<PREDVAR id=\"phi\" />" + |
| 408 |
|
"</CLASS>" + |
| 409 |
|
"</PREDVAR>" + |
| 410 |
|
"<PREDVAR id=\"equal\">" + |
| 411 |
|
"<VAR id=\"x\" />" + |
| 412 |
|
"<VAR id=\"x\" />" + |
| 413 |
|
"</PREDVAR>" + |
| 414 |
|
"</OR>"); |
| 415 |
|
|
| 416 |
1
|
LogicalCheckExceptionList list = |
| 417 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 418 |
1
|
assertEquals(1, list.size()); |
| 419 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
| 420 |
|
} |
| 421 |
|
|
| 422 |
|
|
| 423 |
|
|
| 424 |
|
|
| 425 |
|
|
| 426 |
|
|
| 427 |
|
@throws |
| 428 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 429 |
1
|
public void testLogicalConnectiveNegative14() throws Exception {... |
| 430 |
1
|
final Element ele = TestParser.createElement( |
| 431 |
|
"<IMPL>" + |
| 432 |
|
"<PREDVAR id=\"equal\">" + |
| 433 |
|
"<VAR id=\"x\" />" + |
| 434 |
|
"<VAR id=\"x\" />" + |
| 435 |
|
"</PREDVAR>" + |
| 436 |
|
"<PREDVAR id=\"equal\">" + |
| 437 |
|
"<VAR id=\"y\" />" + |
| 438 |
|
"<CLASS>" + |
| 439 |
|
"<VAR id=\"x\" />" + |
| 440 |
|
"<PREDVAR id=\"phi\" />" + |
| 441 |
|
"</CLASS>" + |
| 442 |
|
"</PREDVAR>" + |
| 443 |
|
"</IMPL>"); |
| 444 |
|
|
| 445 |
1
|
LogicalCheckExceptionList list = |
| 446 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 447 |
1
|
assertEquals(1, list.size()); |
| 448 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
| 449 |
|
} |
| 450 |
|
|
| 451 |
|
|
| 452 |
|
|
| 453 |
|
|
| 454 |
|
|
| 455 |
|
|
| 456 |
|
@throws |
| 457 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 458 |
1
|
public void testLogicalConnectiveNegative15() throws Exception {... |
| 459 |
1
|
final Element ele = TestParser.createElement( |
| 460 |
|
"<IMPL>" + |
| 461 |
|
"<PREDVAR id=\"equal\">" + |
| 462 |
|
"<VAR id=\"y\" />" + |
| 463 |
|
"<CLASS>" + |
| 464 |
|
"<VAR id=\"x\" />" + |
| 465 |
|
"<PREDVAR id=\"phi\" />" + |
| 466 |
|
"</CLASS>" + |
| 467 |
|
"</PREDVAR>" + |
| 468 |
|
"<PREDVAR id=\"equal\">" + |
| 469 |
|
"<VAR id=\"x\" />" + |
| 470 |
|
"<VAR id=\"x\" />" + |
| 471 |
|
"</PREDVAR>" + |
| 472 |
|
"</IMPL>"); |
| 473 |
|
|
| 474 |
1
|
LogicalCheckExceptionList list = |
| 475 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 476 |
1
|
assertEquals(1, list.size()); |
| 477 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
| 478 |
|
} |
| 479 |
|
|
| 480 |
|
|
| 481 |
|
|
| 482 |
|
|
| 483 |
|
|
| 484 |
|
|
| 485 |
|
@throws |
| 486 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 487 |
1
|
public void testLogicalConnectiveNegative16() throws Exception {... |
| 488 |
1
|
final Element ele = TestParser.createElement( |
| 489 |
|
"<EQUI>" + |
| 490 |
|
"<PREDVAR id=\"equal\">" + |
| 491 |
|
"<VAR id=\"x\" />" + |
| 492 |
|
"<VAR id=\"x\" />" + |
| 493 |
|
"</PREDVAR>" + |
| 494 |
|
"<PREDVAR id=\"equal\">" + |
| 495 |
|
"<VAR id=\"y\" />" + |
| 496 |
|
"<CLASS>" + |
| 497 |
|
"<VAR id=\"x\" />" + |
| 498 |
|
"<PREDVAR id=\"phi\" />" + |
| 499 |
|
"</CLASS>" + |
| 500 |
|
"</PREDVAR>" + |
| 501 |
|
"</EQUI>"); |
| 502 |
|
|
| 503 |
1
|
LogicalCheckExceptionList list = |
| 504 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 505 |
1
|
assertEquals(1, list.size()); |
| 506 |
1
|
assertEquals(30770, list.get(0).getErrorCode()); |
| 507 |
|
} |
| 508 |
|
|
| 509 |
|
|
| 510 |
|
|
| 511 |
|
|
| 512 |
|
|
| 513 |
|
|
| 514 |
|
@throws |
| 515 |
|
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
| 516 |
1
|
public void testLogicalConnectiveNegative17() throws Exception {... |
| 517 |
1
|
final Element ele = TestParser.createElement( |
| 518 |
|
"<EQUI>" + |
| 519 |
|
"<PREDVAR id=\"equal\">" + |
| 520 |
|
"<VAR id=\"y\" />" + |
| 521 |
|
"<CLASS>" + |
| 522 |
|
"<VAR id=\"x\" />" + |
| 523 |
|
"<PREDVAR id=\"phi\" />" + |
| 524 |
|
"</CLASS>" + |
| 525 |
|
"</PREDVAR>" + |
| 526 |
|
"<PREDVAR id=\"equal\">" + |
| 527 |
|
"<VAR id=\"x\" />" + |
| 528 |
|
"<VAR id=\"x\" />" + |
| 529 |
|
"</PREDVAR>" + |
| 530 |
|
"</EQUI>"); |
| 531 |
|
|
| 532 |
1
|
LogicalCheckExceptionList list = |
| 533 |
|
FormulaChecker.checkFormula(ele, context, getChecker()); |
| 534 |
1
|
assertEquals(1, list.size()); |
| 535 |
1
|
assertEquals(30780, list.get(0).getErrorCode()); |
| 536 |
|
} |
| 537 |
|
|
| 538 |
|
} |