Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
68508ed5
Commit
68508ed5
authored
Aug 25, 2012
by
Rico Schüller
Committed by
Alexandre Julliard
Aug 27, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add tests for ID3DXConstantTable::GetConstant/ByName/Element().
parent
fdbcbb0c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
1 deletion
+70
-1
shader.c
dlls/d3dx9_36/tests/shader.c
+70
-1
No files found.
dlls/d3dx9_36/tests/shader.c
View file @
68508ed5
...
...
@@ -1731,7 +1731,7 @@ static void test_get_shader_constant_variables(void)
ULONG
count
;
UINT
i
;
UINT
nr
=
1
;
D3DXHANDLE
constant
;
D3DXHANDLE
constant
,
element
;
D3DXCONSTANT_DESC
desc
;
DWORD
*
ctab
;
...
...
@@ -1779,6 +1779,75 @@ static void test_get_shader_constant_variables(void)
fullname
,
(
UINT
)((
DWORD
*
)
desc
.
DefaultValue
-
ctab
),
ctaboffset
);
}
element
=
ID3DXConstantTable_GetConstantElement
(
ctable
,
NULL
,
0
);
ok
(
element
==
NULL
,
"GetConstantElement failed
\n
"
);
constant
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"i"
);
ok
(
constant
!=
NULL
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"i[0]"
);
ok
(
constant
==
element
,
"GetConstantByName failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantElement
(
ctable
,
"i"
,
0
);
ok
(
element
==
constant
,
"GetConstantElement failed, got %p, expected %p
\n
"
,
element
,
constant
);
constant
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f"
);
ok
(
constant
!=
NULL
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstant
(
ctable
,
NULL
,
0
);
ok
(
element
==
constant
,
"GetConstant failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstant
(
ctable
,
"invalid"
,
0
);
ok
(
element
==
NULL
,
"GetConstant failed
\n
"
);
element
=
ID3DXConstantTable_GetConstant
(
ctable
,
"f"
,
0
);
ok
(
element
==
NULL
,
"GetConstant failed
\n
"
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f[0]"
);
ok
(
constant
==
element
,
"GetConstantByName failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f[1]"
);
ok
(
NULL
==
element
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f[0][0]"
);
ok
(
constant
==
element
,
"GetConstantByName failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f."
);
ok
(
element
==
NULL
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstantElement
(
ctable
,
"f"
,
0
);
ok
(
element
==
constant
,
"GetConstantElement failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantElement
(
ctable
,
"f"
,
1
);
ok
(
element
==
NULL
,
"GetConstantElement failed
\n
"
);
constant
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f_2[0]"
);
ok
(
constant
!=
NULL
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f_2"
);
ok
(
element
!=
constant
,
"GetConstantByName failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantElement
(
ctable
,
"f_2"
,
0
);
ok
(
element
==
constant
,
"GetConstantElement failed, got %p, expected %p
\n
"
,
element
,
constant
);
constant
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"f_2[1]"
);
ok
(
constant
!=
NULL
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstantElement
(
ctable
,
"f_2"
,
1
);
ok
(
element
==
constant
,
"GetConstantElement failed, got %p, expected %p
\n
"
,
element
,
constant
);
constant
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
NULL
,
"s_2[0].f"
);
ok
(
constant
!=
NULL
,
"GetConstantByName failed
\n
"
);
element
=
ID3DXConstantTable_GetConstant
(
ctable
,
"s_2[0]"
,
0
);
ok
(
element
==
constant
,
"GetConstant failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
"s_2[0]"
,
"f"
);
ok
(
element
==
constant
,
"GetConstantByName failed, got %p, expected %p
\n
"
,
element
,
constant
);
element
=
ID3DXConstantTable_GetConstantByName
(
ctable
,
"s_2[0]"
,
"invalid"
);
ok
(
element
==
NULL
,
"GetConstantByName failed
\n
"
);
count
=
ID3DXConstantTable_Release
(
ctable
);
ok
(
count
==
0
,
"Release failed, got %u, expected %u
\n
"
,
count
,
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment