Lines Matching refs:var
73 ScopedVariant var; in TEST() local
74 EXPECT_TRUE(var.type() == VT_EMPTY); in TEST()
90 var.Reset(tmp); in TEST()
91 EXPECT_EQ(VT_BSTR, V_VT(&var)); in TEST()
92 EXPECT_EQ(0, lstrcmpW(V_BSTR(&var), kTestString2)); in TEST()
94 var_bstr.Swap(var); in TEST()
95 EXPECT_EQ(VT_EMPTY, V_VT(&var)); in TEST()
119 var.Reset(); in TEST()
120 var.SetDate(date); in TEST()
121 EXPECT_EQ(VT_DATE, var.type()); in TEST()
122 EXPECT_EQ(date, V_DATE(&var)); in TEST()
129 var.Set(static_cast<int8>('v')); in TEST()
130 EXPECT_EQ(VT_I1, var.type()); in TEST()
131 EXPECT_EQ('v', V_I1(&var)); in TEST()
133 var.Set(static_cast<short>(123)); in TEST()
134 EXPECT_EQ(VT_I2, var.type()); in TEST()
135 EXPECT_EQ(123, V_I2(&var)); in TEST()
137 var.Set(static_cast<int32>(123)); in TEST()
138 EXPECT_EQ(VT_I4, var.type()); in TEST()
139 EXPECT_EQ(123, V_I4(&var)); in TEST()
141 var.Set(static_cast<int64>(123)); in TEST()
142 EXPECT_EQ(VT_I8, var.type()); in TEST()
143 EXPECT_EQ(123, V_I8(&var)); in TEST()
145 var.Set(static_cast<uint8>(123)); in TEST()
146 EXPECT_EQ(VT_UI1, var.type()); in TEST()
147 EXPECT_EQ(123, V_UI1(&var)); in TEST()
149 var.Set(static_cast<unsigned short>(123)); in TEST()
150 EXPECT_EQ(VT_UI2, var.type()); in TEST()
151 EXPECT_EQ(123, V_UI2(&var)); in TEST()
153 var.Set(static_cast<uint32>(123)); in TEST()
154 EXPECT_EQ(VT_UI4, var.type()); in TEST()
155 EXPECT_EQ(123, V_UI4(&var)); in TEST()
157 var.Set(static_cast<uint64>(123)); in TEST()
158 EXPECT_EQ(VT_UI8, var.type()); in TEST()
159 EXPECT_EQ(123, V_UI8(&var)); in TEST()
161 var.Set(123.123f); in TEST()
162 EXPECT_EQ(VT_R4, var.type()); in TEST()
163 EXPECT_EQ(123.123f, V_R4(&var)); in TEST()
165 var.Set(static_cast<double>(123.123)); in TEST()
166 EXPECT_EQ(VT_R8, var.type()); in TEST()
167 EXPECT_EQ(123.123, V_R8(&var)); in TEST()
169 var.Set(true); in TEST()
170 EXPECT_EQ(VT_BOOL, var.type()); in TEST()
171 EXPECT_EQ(VARIANT_TRUE, V_BOOL(&var)); in TEST()
172 var.Set(false); in TEST()
173 EXPECT_EQ(VT_BOOL, var.type()); in TEST()
174 EXPECT_EQ(VARIANT_FALSE, V_BOOL(&var)); in TEST()
178 var.Set(static_cast<IDispatch*>(NULL)); in TEST()
179 EXPECT_EQ(VT_DISPATCH, var.type()); in TEST()
180 EXPECT_EQ(NULL, V_DISPATCH(&var)); in TEST()
181 var.Reset(); in TEST()
183 var.Set(static_cast<IUnknown*>(NULL)); in TEST()
184 EXPECT_EQ(VT_UNKNOWN, var.type()); in TEST()
185 EXPECT_EQ(NULL, V_UNKNOWN(&var)); in TEST()
186 var.Reset(); in TEST()
190 var.Set(static_cast<IDispatch*>(&faker)); in TEST()
191 EXPECT_EQ(VT_DISPATCH, var.type()); in TEST()
192 EXPECT_EQ(&faker, V_DISPATCH(&var)); in TEST()
194 var.Reset(); in TEST()
197 var.Set(static_cast<IUnknown*>(&faker)); in TEST()
198 EXPECT_EQ(VT_UNKNOWN, var.type()); in TEST()
199 EXPECT_EQ(&faker, V_UNKNOWN(&var)); in TEST()
201 var.Reset(); in TEST()
235 var.Set(raw); in TEST()
237 var.Reset(); in TEST()
247 var.Set(static_cast<SAFEARRAY*>(NULL)); in TEST()
248 EXPECT_EQ(VT_EMPTY, var.type()); in TEST()
253 var.Set(sa); in TEST()
255 EXPECT_TRUE(ScopedVariant::IsLeakableVarType(var.type())); in TEST()
257 EXPECT_EQ(VT_ARRAY | VT_UI1, var.type()); in TEST()
258 EXPECT_EQ(sa, V_ARRAY(&var)); in TEST()