Review comments

This commit is contained in:
jpirnay
2026-04-29 11:26:50 +02:00
parent b83482e732
commit a0243ad6de
6 changed files with 66 additions and 21 deletions
+15 -6
View File
@@ -15,13 +15,13 @@ static int testsFailed = 0;
} \
} while (0)
#define ASSERT_TRUE(cond) \
do { \
if (!(cond)) { \
#define ASSERT_TRUE(cond) \
do { \
if (!(cond)) { \
fprintf(stderr, " FAIL: %s:%d: %s is false\n", __FILE__, __LINE__, #cond); \
testsFailed++; \
return; \
} \
testsFailed++; \
return; \
} \
} while (0)
#define PASS() testsPassed++
@@ -42,6 +42,14 @@ void testInlineUnderlineLineThrough() {
PASS();
}
void testInlineLineThroughUnderlineOrderInsensitive() {
printf("testInlineLineThroughUnderlineOrderInsensitive...\n");
const CssStyle style = CssParser::parseInlineStyle("text-decoration: line-through underline");
ASSERT_TRUE(style.hasTextDecoration());
ASSERT_EQ(style.textDecoration, CssTextDecoration::UnderlineLineThrough);
PASS();
}
void testInlineTextDecorationNormalization() {
printf("testInlineTextDecorationNormalization...\n");
const CssStyle style = CssParser::parseInlineStyle("TEXT-DECORATION : LINE-THROUGH ;");
@@ -55,6 +63,7 @@ int main() {
testInlineLineThrough();
testInlineUnderlineLineThrough();
testInlineLineThroughUnderlineOrderInsensitive();
testInlineTextDecorationNormalization();
printf("\n=== Results: %d passed, %d failed ===\n", testsPassed, testsFailed);