20 references to HelloWorld
Microsoft.CodeAnalysis.UnitTests (20)
Text\SourceTextTests.cs (20)
56Assert.Same(s_utf8, SourceText.From(HelloWorld, s_utf8).Encoding); 57Assert.Same(s_unicode, SourceText.From(HelloWorld, s_unicode).Encoding); 59var bytes = s_unicode.GetBytes(HelloWorld); 85Assert.Equal(SourceHashAlgorithm.Sha1, SourceText.From(HelloWorld).ChecksumAlgorithm); 87var bytes = s_unicode.GetBytes(HelloWorld); 99Assert.Equal(algorithm, SourceText.From(HelloWorld, checksumAlgorithm: algorithm).ChecksumAlgorithm); 101var bytes = s_unicode.GetBytes(HelloWorld); 121verifyChecksumAndContentHash(SourceText.From(HelloWorld, encodingNoBOM, checksumAlgorithm), checksumNoBOM, expectedContentHash); 122verifyChecksumAndContentHash(SourceText.From(HelloWorld, encodingBOM, checksumAlgorithm), checksumBOM, expectedContentHash); 162verifyChecksumAndContentHash(FromLargeTextWriter(HelloWorld, encodingNoBOM, checksumAlgorithm), checksumNoBOM, expectedContentHash); 163verifyChecksumAndContentHash(FromLargeTextWriter(HelloWorld, encodingBOM, checksumAlgorithm), checksumBOM, expectedContentHash); 166verifyChecksumAndContentHash(fromChanges(SourceText.From(HelloWorld, encodingNoBOM, checksumAlgorithm)), checksumNoBOM, expectedContentHash); 167verifyChecksumAndContentHash(fromChanges(SourceText.From(HelloWorld, encodingBOM, checksumAlgorithm)), checksumBOM, expectedContentHash); 213var f = SourceText.From(HelloWorld, s_utf8); 215Assert.True(f.ContentEquals(SourceText.From(HelloWorld, s_utf8))); 216Assert.False(f.ContentEquals(SourceText.From(HelloWorld + "o", s_utf8))); 217Assert.True(SourceText.From(HelloWorld, s_utf8).ContentEquals(SourceText.From(HelloWorld, s_utf8))); 219var e1 = EncodedStringText.Create(new MemoryStream(s_unicode.GetBytes(HelloWorld)), s_unicode); 220var e2 = EncodedStringText.Create(new MemoryStream(s_utf8.GetBytes(HelloWorld)), s_utf8);