Skip to content

Test plan for "raw string literals" #55306

@jcouv

Description

@jcouv

Spec: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-11.0/raw-string-literal.md
Championed issue: dotnet/csharplang#4304

Compiler

  • Address PROTOTYPE comments
  • test semantic model APIs (GetTypeInfo in literal and expressions in holes)
  • Review any public API changes
  • nullability
  • consider improving diagnostic for bad indent
  • Expression trees (see AsStringInExpressionTrees_01)
  • constant interpolations (see TestInConstantFieldInitializer...).
  • Update test plan
  • verify order of evaluation of interpolations, definite assignment
  • LangVer
  • balanced and unbalanced open and close braces
  • test parsing with @$$ and $$@ (errors)
  • test interpolated single-line raw string with newlines in interpolation hole/expression
  • nested interpolated strings of different kinds (interpolated, interpolated verbatim, interpolated raw)
  • formats
  • SyntaxNormalizer (see TestSpacingOnRawInterpolatedString)
  • Conversion of interpolations to IFormattable and FormattableString result in calling FormattableStringFactory.Create, otherwise natural type string results in string.Format
  • Newline in format specifier (see TrailingSpaceInFormatSpecifier02)
  • interpolation handlers

Productivity

  • Review IDE code that references SyntaxKind.InterpolatedStringStartToken (there's a few locations)
  • Typing/completion
  • Colorization
  • QuickInfo
    • test multi-line in immediate window and QuickWatch/watch
    • QuickInfo should display constant value
  • Formatting/indentation
  • below minbar below:
  • Display indentation line
  • Convert to raw string literal (PR Add refactoring to convert normal (or verbatim) strings to raw strings. #59180)
  • Add a " on both ends
  • Add a $
  • Interaction with regexes /*regex*/ """[0-9a-z]*"""; (should colorization correctly)
  • Interaction with datetime completion DateTime.Now.ToString(... typing here ...)

IDE follow-up work: #58356
For exploratory testing, see IDE test plan: https://github.com/dotnet/roslyn/blob/main/docs/wiki/Manual-Testing.md

Metadata

Metadata

Type

No type

Projects

Status

Language/design

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions