Skip to content

Commit 2beb029

Browse files
committed
Adapt CI test to css4j 5.0
1 parent b268ce3 commit 2beb029

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/examples/java/io/sf/carte/example/Css4jTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@
6969
import io.sf.carte.doc.style.css.nsac.Condition;
7070
import io.sf.carte.doc.style.css.nsac.Condition.ConditionType;
7171
import io.sf.carte.doc.style.css.nsac.ConditionalSelector;
72+
import io.sf.carte.doc.style.css.nsac.DeclarationCondition;
7273
import io.sf.carte.doc.style.css.nsac.ElementSelector;
7374
import io.sf.carte.doc.style.css.nsac.LexicalUnit;
74-
import io.sf.carte.doc.style.css.nsac.Parser;
7575
import io.sf.carte.doc.style.css.nsac.LexicalUnit.LexicalType;
76+
import io.sf.carte.doc.style.css.nsac.Parser;
7677
import io.sf.carte.doc.style.css.nsac.Selector;
7778
import io.sf.carte.doc.style.css.nsac.Selector.SelectorType;
7879
import io.sf.carte.doc.style.css.nsac.SelectorList;
@@ -86,7 +87,6 @@
8687
import io.sf.carte.doc.style.css.om.StyleRule;
8788
import io.sf.carte.doc.style.css.om.StyleSheetList;
8889
import io.sf.carte.doc.style.css.om.SupportsRule;
89-
import io.sf.carte.doc.style.css.parser.DeclarationCondition;
9090
import io.sf.carte.doc.style.css.parser.SyntaxParser;
9191
import io.sf.carte.doc.style.css.property.LexicalValue;
9292
import io.sf.carte.doc.style.css.property.NumberValue;
@@ -747,13 +747,13 @@ public void testUsageSupportsCondition() throws Exception {
747747
assertEquals("display", predName);
748748

749749
// Now obtain the value
750-
CSSValue value = dCond.getValue();
751-
Type priType = value.getPrimitiveType();
752-
// It is a Type.IDENT
753-
assertEquals(Type.IDENT, priType);
750+
LexicalUnit value = dCond.getValue();
751+
LexicalUnit.LexicalType luType = value.getLexicalUnitType();
752+
// It is a IDENT
753+
assertEquals(LexicalUnit.LexicalType.IDENT, luType);
754754

755-
// IDENT is a TYPED value, so we can cast and get the string value
756-
String condValue = ((CSSTypedValue) value).getStringValue();
755+
// Get the string value
756+
String condValue = value.getStringValue();
757757
// It is "flex"
758758
assertEquals("flex", condValue);
759759
}

0 commit comments

Comments
 (0)