@@ -126,15 +126,15 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
126
126
CompilerType void_void = GetCompilerType (b.Mangle (n));
127
127
ASSERT_TRUE (void_void.IsFunctionType (nullptr ));
128
128
ASSERT_TRUE (void_void.IsFunctionPointerType ());
129
- ASSERT_EQ (void_void.GetNumberOfFunctionArguments (), 0 );
129
+ ASSERT_EQ (void_void.GetNumberOfFunctionArguments (), 0UL );
130
130
}
131
131
{
132
132
NodePointer n = b.GlobalType (
133
133
b.Node (Node::Kind::ImplFunctionType, b.Node (Node::Kind::ImplEscaping),
134
134
b.Node (Node::Kind::ImplConvention, " @callee_guaranteed" )));
135
135
CompilerType impl_void_void = GetCompilerType (b.Mangle (n));
136
136
ASSERT_TRUE (impl_void_void.IsFunctionType (nullptr ));
137
- ASSERT_EQ (impl_void_void.GetNumberOfFunctionArguments (), 0 );
137
+ ASSERT_EQ (impl_void_void.GetNumberOfFunctionArguments (), 0UL );
138
138
}
139
139
{
140
140
NodePointer n = b.GlobalType (b.Node (
@@ -147,7 +147,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
147
147
b.Node (Node::Kind::Tuple))));
148
148
CompilerType impl_two_args = GetCompilerType (b.Mangle (n));
149
149
ASSERT_TRUE (impl_two_args.IsFunctionType (nullptr ));
150
- ASSERT_EQ (impl_two_args.GetNumberOfFunctionArguments (), 2 );
150
+ ASSERT_EQ (impl_two_args.GetNumberOfFunctionArguments (), 2UL );
151
151
ASSERT_EQ (impl_two_args.GetFunctionArgumentAtIndex (0 ), int_type);
152
152
ASSERT_EQ (impl_two_args.GetFunctionArgumentAtIndex (1 ), void_type);
153
153
ASSERT_EQ (impl_two_args.GetFunctionArgumentTypeAtIndex (0 ), int_type);
@@ -167,7 +167,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Function) {
167
167
b.Node (Node::Kind::Type, b.Node (Node::Kind::Tuple)))));
168
168
CompilerType two_args = GetCompilerType (b.Mangle (n));
169
169
ASSERT_TRUE (two_args.IsFunctionType (nullptr ));
170
- ASSERT_EQ (two_args.GetNumberOfFunctionArguments (), 2 );
170
+ ASSERT_EQ (two_args.GetNumberOfFunctionArguments (), 2UL );
171
171
ASSERT_EQ (two_args.GetFunctionArgumentAtIndex (0 ), int_type);
172
172
ASSERT_EQ (two_args.GetFunctionArgumentAtIndex (1 ), void_type);
173
173
ASSERT_EQ (two_args.GetFunctionArgumentTypeAtIndex (0 ), int_type);
@@ -306,7 +306,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Scalar) {
306
306
uint32_t count = 99 ;
307
307
bool is_complex = true ;
308
308
ASSERT_FALSE (int_type.IsFloatingPointType (count, is_complex));
309
- ASSERT_EQ (count, 0 );
309
+ ASSERT_EQ (count, 0UL );
310
310
ASSERT_EQ (is_complex, false );
311
311
bool is_signed = true ;
312
312
ASSERT_TRUE (int_type.IsIntegerType (is_signed));
@@ -318,7 +318,7 @@ TEST_F(TestTypeSystemSwiftTypeRef, Scalar) {
318
318
uint32_t count = 99 ;
319
319
bool is_complex = true ;
320
320
ASSERT_TRUE (float_type.IsFloatingPointType (count, is_complex));
321
- ASSERT_EQ (count, 1 );
321
+ ASSERT_EQ (count, 1UL );
322
322
ASSERT_EQ (is_complex, false );
323
323
bool is_signed = true ;
324
324
ASSERT_FALSE (float_type.IsIntegerType (is_signed));
@@ -402,6 +402,20 @@ TEST_F(TestTypeSystemSwiftTypeRef, Tuple) {
402
402
ASSERT_EQ (float_int_tuple.GetMangledTypeName (),
403
403
" $ss0019BuiltinFPIEEE_CJEEdV1f_s0016BuiltinInt_gCJAcV1itD" );
404
404
}
405
+ {
406
+ NodePointer n = b.GlobalType (
407
+ b.Node (Node::Kind::Tuple,
408
+ b.Node (Node::Kind::TupleElement,
409
+ b.Node (Node::Kind::TupleElementName, " x" ), b.IntType ()),
410
+ b.Node (Node::Kind::TupleElement, b.IntType ()),
411
+ b.Node (Node::Kind::TupleElement,
412
+ b.Node (Node::Kind::TupleElementName, " z" ), b.IntType ())));
413
+ CompilerType t = GetCompilerType (b.Mangle (n));
414
+ lldb::opaque_compiler_type_t o = t.GetOpaqueQualType ();
415
+ ASSERT_EQ (m_swift_ts.GetTupleElementName (o, 0 ), " x" );
416
+ ASSERT_EQ (m_swift_ts.GetTupleElementName (o, 1 ), " 1" );
417
+ ASSERT_EQ (m_swift_ts.GetTupleElementName (o, 2 ), " z" );
418
+ }
405
419
}
406
420
407
421
TEST_F (TestTypeSystemSwiftTypeRef, TypeClass) {
0 commit comments