39 references to ClassifyConversion
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (39)
Semantics\Conversions.vb (39)
279Assert.Equal(ConversionKind.WideningNothingLiteral, ClassifyConversion(_nothing, testType, methodBodyBinder))
315ClassifyConversion(literal, typeCodeType, methodBodyBinder))
323Assert.Equal(If(integralType Is typeCodeType, ConversionKind.Identity, ConversionKind.NarrowingNumeric Or ConversionKind.InvolvesEnumTypeConversions), ClassifyConversion(constant, typeCodeType, methodBodyBinder))
343Assert.Equal(ClassifyConversion(convertibleType, typeCodeType), ClassifyConversion(literal, typeCodeType, methodBodyBinder))
435Assert.Equal(If(type2.IsEnumType() AndAlso type1 Is int32Type, ConversionKind.WideningNumeric Or ConversionKind.InvolvesEnumTypeConversions, expectedConv), ClassifyConversion(literal, type2, methodBodyBinder))
436Assert.Equal(expectedConv, ClassifyConversion(constant, type2, methodBodyBinder))
461Assert.Equal(expectedConv Or ConversionKind.InvolvesNarrowingFromNumericConstant, ClassifyConversion(literal, nullableType2, methodBodyBinder))
463Assert.Equal(expectedConv, ClassifyConversion(literal, nullableType2, methodBodyBinder))
466Assert.Equal(expectedConv, ClassifyConversion(constant, nullableType2, methodBodyBinder))
480Assert.Equal(If(type1 Is typeCodeType, ConversionKind.NarrowingBoolean Or ConversionKind.InvolvesEnumTypeConversions, ConversionKind.NarrowingBoolean), ClassifyConversion(literal, type2, methodBodyBinder))
481Assert.Equal(If(type1 Is typeCodeType, ConversionKind.NarrowingBoolean Or ConversionKind.InvolvesEnumTypeConversions, ConversionKind.NarrowingBoolean), ClassifyConversion(constant, type2, methodBodyBinder))
513Assert.True(Conversions.IsIdentityConversion(ClassifyConversion(literal, type2, methodBodyBinder)))
514Assert.True(Conversions.IsIdentityConversion(ClassifyConversion(constant, type2, methodBodyBinder)))
633Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder)
634Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder)
752conv = ClassifyConversion(literal, numericType, methodBodyBinder)
756(ClassifyConversion(zero, nullableType2, methodBodyBinder) And ConversionKind.InvolvesNarrowingFromNumericConstant)
759Assert.Equal(conv, ClassifyConversion(literal, nullableType2, methodBodyBinder))
760Assert.Equal(conv, ClassifyConversion(constant, nullableType2, methodBodyBinder))
848Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder)
849Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder)
880Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder)
881Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder)
942Dim conv = ClassifyConversion(literal, booleanType, methodBodyBinder)
943Dim conv2 = ClassifyConversion(constant, booleanType, methodBodyBinder)
973Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(literal, charType, methodBodyBinder))
974Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(constant, charType, methodBodyBinder))
998Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(literal, charType, methodBodyBinder))
999Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(constant, charType, methodBodyBinder))
1021Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(literal, charType, methodBodyBinder))
1022Assert.Equal(ConversionKind.NarrowingString, ClassifyConversion(constant, charType, methodBodyBinder))
1043Assert.Equal(ConversionKind.WideningString, ClassifyConversion(literal, stringType, methodBodyBinder))
1044Assert.Equal(ConversionKind.WideningString, ClassifyConversion(constant, stringType, methodBodyBinder))
1193Dim conv = ClassifyConversion(literal, numericType, methodBodyBinder)
1194Dim conv2 = ClassifyConversion(constant, numericType, methodBodyBinder)
1319conv = ClassifyConversion(literal, numericType, methodBodyBinder)
1323(ClassifyConversion(zero, nullableType2, methodBodyBinder) And ConversionKind.InvolvesNarrowingFromNumericConstant)
1326Assert.Equal(conv, ClassifyConversion(literal, nullableType2, methodBodyBinder))
1327Assert.Equal(conv, ClassifyConversion(constant, nullableType2, methodBodyBinder))