summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-rc/Inputs
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-10-06 20:51:20 +0000
committerZachary Turner <zturner@google.com>2017-10-06 20:51:20 +0000
commit420090af89bacc97ce9c9c28eb3d32d0c704ca53 (patch)
treee7e7c3a236813be6ef8dfdcde0f3c7f1ba847fdf /llvm/test/tools/llvm-rc/Inputs
parente9baea817822ec183f521c444b37d257aabbc655 (diff)
downloadbcm5719-llvm-420090af89bacc97ce9c9c28eb3d32d0c704ca53.tar.gz
bcm5719-llvm-420090af89bacc97ce9c9c28eb3d32d0c704ca53.zip
[llvm-rc] Add optional serialization support for DIALOG(EX) resources.
This is part 5 of llvm-rc serialization support. This allows DIALOG and DIALOGEX to serialize if dialog-specific optional statements are provided. These are (as of now): CAPTION, FONT, and STYLE. Notably, FONT statement can take more than two arguments when describing DIALOGEX resources (as in msdn.microsoft.com/en-us/library/windows/desktop/aa381013.aspx). I made some changes to the parser to reflect this fact. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D37864 llvm-svn: 315104
Diffstat (limited to 'llvm/test/tools/llvm-rc/Inputs')
-rw-r--r--llvm/test/tools/llvm-rc/Inputs/parser-correct-everything.rc2
-rw-r--r--llvm/test/tools/llvm-rc/Inputs/parser-dialog-simple-font.rc4
-rw-r--r--llvm/test/tools/llvm-rc/Inputs/tag-dialog-bad-style.rc2
-rw-r--r--llvm/test/tools/llvm-rc/Inputs/tag-dialog-headers.rc53
4 files changed, 60 insertions, 1 deletions
diff --git a/llvm/test/tools/llvm-rc/Inputs/parser-correct-everything.rc b/llvm/test/tools/llvm-rc/Inputs/parser-correct-everything.rc
index 5f15bcc0944..d3d95b2e4ff 100644
--- a/llvm/test/tools/llvm-rc/Inputs/parser-correct-everything.rc
+++ b/llvm/test/tools/llvm-rc/Inputs/parser-correct-everything.rc
@@ -61,7 +61,7 @@ LANGUAGE 4, 1
LANGUAGE 1, 2
CHARACTERISTICS 50
VERSION 100
-FONT 12, "Arial"
+FONT 12, "Arial", 500, 1, 13
CAPTION "RC parser dialog"
STYLE 0x51234
BEGIN
diff --git a/llvm/test/tools/llvm-rc/Inputs/parser-dialog-simple-font.rc b/llvm/test/tools/llvm-rc/Inputs/parser-dialog-simple-font.rc
new file mode 100644
index 00000000000..770b31a3646
--- /dev/null
+++ b/llvm/test/tools/llvm-rc/Inputs/parser-dialog-simple-font.rc
@@ -0,0 +1,4 @@
+1 DIALOG 1, 2, 3, 4
+FONT 12, "Face", 100, 1, 0
+BEGIN
+END
diff --git a/llvm/test/tools/llvm-rc/Inputs/tag-dialog-bad-style.rc b/llvm/test/tools/llvm-rc/Inputs/tag-dialog-bad-style.rc
new file mode 100644
index 00000000000..3e5f8ab959f
--- /dev/null
+++ b/llvm/test/tools/llvm-rc/Inputs/tag-dialog-bad-style.rc
@@ -0,0 +1,2 @@
+1 DIALOG 1, 2, 3, 4
+STYLE 0xFFFF0001 {}
diff --git a/llvm/test/tools/llvm-rc/Inputs/tag-dialog-headers.rc b/llvm/test/tools/llvm-rc/Inputs/tag-dialog-headers.rc
new file mode 100644
index 00000000000..8007588073f
--- /dev/null
+++ b/llvm/test/tools/llvm-rc/Inputs/tag-dialog-headers.rc
@@ -0,0 +1,53 @@
+1 DIALOGEX 1, 2, 3, 4 {}
+2 DIALOG 1, 2, 3, 4 {}
+
+3 DIALOGEX 10000, 20000, 30000, 32767
+CAPTION "My Caption" {}
+4 DIALOG -32768, 32767, 0, 32767
+CAPTION "My Caption" {}
+
+5 DIALOGEX 0, 1, 0, 9
+STYLE 0x01234567 {}
+6 DIALOG 0, 1, 0, 9
+STYLE 0x01234567 {}
+
+7 DIALOGEX 8, 7, 6, 5
+FONT 50, "a" {}
+8 DIALOG 8, 7, 6, 5
+FONT 50, "aaaa" {}
+9 DIALOGEX 8, 7, 6, 5
+FONT 50, L"a" {}
+10 DIALOG 8, 7, 6, 5
+FONT 50, L"aaaa" {}
+11 DIALOGEX 1, 2, 3, 4
+FONT 50, "FONT", 51 {}
+12 DIALOGEX 1, 2, 3, 4
+FONT 50, "FONT", 51, 52 {}
+13 DIALOGEX 1, 2, 3, 4
+FONT 50, "FONT", 51, 52, 53 {}
+
+14 DIALOGEX 1, 1, 1, 1
+CAPTION "CAPTION" FONT 42, "FONT" {}
+15 DIALOG 1, 1, 1, 1
+CAPTION "CAPTION" FONT 42, "FONT" {}
+
+16 DIALOGEX 2, 2, 2, 2
+CAPTION "CAPTION" FONT 42, "FONT" STYLE 0 {}
+17 DIALOG 2, 2, 2, 2
+CAPTION "CAPTION" FONT 42, "FONT" STYLE 0 {}
+
+18 DIALOGEX 3, 3, 3, 3
+CAPTION "CAPTION" STYLE 0 {}
+19 DIALOG 3, 3, 3, 3
+CAPTION "CAPTION" STYLE 0 {}
+
+20 DIALOGEX 4, 4, 4, 4 STYLE 0xFF00FF00 {}
+21 DIALOG 4, 4, 4, 4 STYLE 0xFF00FF00 {}
+22 DIALOGEX 4, 4, 4, 4 STYLE 0x00FF00FF {}
+23 DIALOG 4, 4, 4, 4 STYLE 0x00FF00FF {}
+
+24 DIALOGEX 5, 5, 5, 5 CAPTION "" STYLE 0 {}
+25 DIALOG 5, 5, 5, 5 CAPTION "" STYLE 0 {}
+
+26 DIALOGEX 1, 2, 3, 4, 5 {}
+
OpenPOWER on IntegriCloud