Changeset 437 for trunk/org.modelica.mdt.test
- Timestamp:
- 03/17/06 10:13:30 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/org.modelica.mdt.test/src/org/modelica/mdt/test/TestModelicaParser.java
r435 r437 142 142 143 143 private static final String GET_CLASS_INFO1 = 144 "{\"model\"," + 145 "\"Chua's circuit, ns, V, A\"," + 146 "C:\\OpenModelica132\\ModelicaLibrary\\Modelica\\Electrical\\Anal" + 147 "og\\Examples\\ChuaCircuit.mo\"," + 148 "{false,false,true}," + 149 "{\"writable\",1,1,65,16}}"; 150 144 "{\"model\",\"Chua's circuit, ns, V, A\",\"/home/x05andre/ex/Modelica " + 145 "Library/Modelica/Electrical/Analog/Examples/ChuaCircuit.mo\",{false,f" + 146 "alse,true},{\"writable\",1,1,65,16}}"; 151 147 /* 152 148 * The expected results when getElements() output is parsed … … 414 410 415 411 parsedList = ModelicaParser.parseList(GET_CLASS_INFO1); 416 417 assertEquals(" parse resuls if of wrong length", 4, parsedList.size());412 413 assertEquals("Parse resuls is of wrong length", 5, parsedList.size()); 418 414 419 415 listElement = parsedList.elementAt(0); 420 assertTrue(" expected simple element found list",421 listElement instanceof Element); 422 assertEquals(" wrong string", "\"model\"",416 assertTrue("Expected simple element found list", 417 listElement instanceof Element); 418 assertEquals("Wrong string", "\"model\"", 423 419 ((Element)listElement).toString()); 424 420 … … 426 422 assertTrue("expected simple element found list", 427 423 listElement instanceof Element); 428 assertEquals("wrong string", 429 "Chua's circuit, ns, V, A\",\"C:\\OpenModelica132\\Modelica" + 430 "Library\\Modelica\\Electrical\\Analog\\Examples\\ChuaCircuit.mo", 431 ((Element)listElement).toString()); 432 424 assertEquals("Wrong string", 425 "\"Chua's circuit, ns, V, A\"", 426 ((Element)listElement).toString()); 433 427 434 428 listElement = parsedList.elementAt(2); 435 assertTrue("expected list found simple element", 436 listElement instanceof List); 437 list = (List)listElement; 438 439 assertEquals("parse resuls if of wrong length", 3, parsedList.size()); 440 441 listElement = list.elementAt(0); 442 assertTrue("expected simple element found list", 443 listElement instanceof Element); 444 assertEquals("wrong string", "false", 445 ((Element)listElement).toString()); 446 447 listElement = list.elementAt(1); 448 assertTrue("expected simple element found list", 449 listElement instanceof Element); 450 assertEquals("wrong string", "false", 451 ((Element)listElement).toString()); 452 453 listElement = list.elementAt(2); 454 assertTrue("expected simple element found list", 455 listElement instanceof Element); 456 assertEquals("wrong string", "true", 457 ((Element)listElement).toString()); 458 459 429 assertTrue("Expected simple element found list", 430 listElement instanceof Element); 431 assertEquals("Wrong string", 432 "\"/home/x05andre/ex/Modelica Library/Modelica/Electrical/Anal" + 433 "og/Examples/ChuaCircuit.mo\"", 434 ((Element)listElement).toString()); 435 460 436 listElement = parsedList.elementAt(3); 461 437 assertTrue("expected list found simple element", … … 463 439 list = (List)listElement; 464 440 465 assertEquals("parse resuls if of wrong length", 5, parsedList.size());441 assertEquals("parse resuls if of wrong length", 3, list.size()); 466 442 467 443 listElement = list.elementAt(0); 468 444 assertTrue("expected simple element found list", 469 445 listElement instanceof Element); 470 assertEquals("wrong string", "writeable", 446 assertEquals("wrong string", "false", 447 ((Element)listElement).toString()); 448 449 listElement = list.elementAt(1); 450 assertTrue("expected simple element found list", 451 listElement instanceof Element); 452 assertEquals("wrong string", "false", 453 ((Element)listElement).toString()); 454 455 listElement = list.elementAt(2); 456 assertTrue("expected simple element found list", 457 listElement instanceof Element); 458 assertEquals("wrong string", "true", 459 ((Element)listElement).toString()); 460 461 462 listElement = parsedList.elementAt(4); 463 assertTrue("expected list found simple element", 464 listElement instanceof List); 465 list = (List)listElement; 466 467 assertEquals("parse resuls if of wrong length", 5, list.size()); 468 469 listElement = list.elementAt(0); 470 assertTrue("expected simple element found list", 471 listElement instanceof Element); 472 assertEquals("wrong string", "\"writable\"", 471 473 ((Element)listElement).toString()); 472 474
Note: See TracChangeset
for help on using the changeset viewer.