From 785090a33b7bba5c555fbb7db1bf8ab62d9d2068 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 16 Jan 2009 17:09:30 +0000 Subject: Tests for properties 0b to 0f. svn path=/trunk/libcss/; revision=6089 --- docs/Bytecode | 2 +- test/data/parse/properties.dat | 142 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 1 deletion(-) diff --git a/docs/Bytecode b/docs/Bytecode index a7dfd63..a8366c1 100644 --- a/docs/Bytecode +++ b/docs/Bytecode @@ -308,7 +308,7 @@ Opcodes clip: rect(10px, auto, auto, 10px) would produce the following bytecode: - <02c0000e> <0000000a> <00000000> <0000000a> <00000000> + <02c0000e> <00002800> <00000000> <00002800> <00000000> 0f - color (14bits) : diff --git a/test/data/parse/properties.dat b/test/data/parse/properties.dat index 1b8f690..03a7cf0 100644 --- a/test/data/parse/properties.dat +++ b/test/data/parse/properties.dat @@ -426,3 +426,145 @@ | 1 * | 0x0200000a 0x00000800 0x00000000 #reset + +## +## 0b - bottom +## + +#data +* { bottom: auto; } +#errors +#expected +| 1 * +| 0x0000000b +#reset + +#data +* { bottom: 0.75em; } +#errors +#expected +| 1 * +| 0x0200000b 0x00000300 0x00000002 +#reset + +#data +* { bottom: 66.667%; } +#errors +#expected +| 1 * +| 0x0200000b 0x00010aab 0x00000100 +#reset + +## +## 0c - caption-side +## + +#data +* { caption-side: top; } +#errors +#expected +| 1 * +| 0x0000000c +#reset + +#data +* { caption-side: bottom; } +#errors +#expected +| 1 * +| 0x0004000c +#reset + +## +## 0d - clear +## + +#data +* { clear: none; } +#errors +#expected +| 1 * +| 0x0000000d +#reset + +#data +* { clear: left; } +#errors +#expected +| 1 * +| 0x0004000d +#reset + +#data +* { clear: right; } +#errors +#expected +| 1 * +| 0x0008000d +#reset + +#data +* { clear: both; } +#errors +#expected +| 1 * +| 0x000c000d +#reset + +## +## 0e - clip +## + +#data +* { clip: auto; } +#errors +#expected +| 1 * +| 0x0000000e +#reset + +#data +* { clip: rect(10px, auto, auto, 10px); } +#errors +#expected +| 1 * +| 0x02c02800 0x0000000a 0x00000000 0x00002800 0x00000000 +#reset + +#data +* { clip: rect(auto, auto, auto, auto); } +#errors +#expected +| 1 * +| 0x03e0000e +#reset + +#data +* { clip: rect(1px, 2px, 3px, 4px); } +#errors +#expected +| 1 * +| 0x0200000e 0x00000400 0x00000000 0x00000800 0x00000000 0x00000c00 0x00000000 0x00001000 0x00000000 +#reset + +#data +* { clip: rect(auto 1em 1em auto); } +#errors +#expected +| 1 * +| 0x0320000e 0x00000400 0x00000002 0x00000400 0x00000002 +#reset + +## +## 0f - color +## + +## more fully tested in colours.dat + +#data +* { color: #BBC } +#errors +#expected +| 1 * +| 0x0200000f 0xbbbbcc00 +#reset -- cgit v1.2.3