Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved CodeGen/EmittedIL/LiteralValue over to NUnit #7291

Merged
merged 2 commits into from
Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions tests/fsharp/Compiler/CodeGen/EmittedIL/LiteralValue.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.

namespace FSharp.Compiler.UnitTests.CodeGen.EmittedIL

open FSharp.Compiler.UnitTests
open NUnit.Framework

[<TestFixture>]
module ``Literal Value`` =

[<Test>]
let ``Literal Value``() =
CompilerAssert.CompileLibraryAndVerifyIL
"""
module LiteralValue
[<Literal>]
let x = 7
[<EntryPoint>]
let main _ =
0
"""
(fun verifier -> verifier.VerifyIL [
"""
.field public static literal int32 x = int32(0x00000007)
"""
])
1 change: 1 addition & 0 deletions tests/fsharp/Compiler/ILChecker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ module ILChecker =
|> filterSpecialComment

expectedIL
|> List.map (fun (ilCode: string) -> ilCode.Trim() )
sergey-tihon marked this conversation as resolved.
Show resolved Hide resolved
|> List.iter (fun (ilCode: string) ->
let expectedLines = ilCode.Split('\n')
let startIndex = textNoComments.IndexOf(expectedLines.[0])
Expand Down
1 change: 1 addition & 0 deletions tests/fsharp/FSharpSuite.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<Compile Include="tests.fs" />
<Compile Include="Compiler\ILChecker.fs" />
<Compile Include="Compiler\CompilerAssert.fs" />
<Compile Include="Compiler\CodeGen\EmittedIL\LiteralValue.fs" />
<Compile Include="Compiler\Conformance\BasicGrammarElements\BasicConstants.fs" />
<Compile Include="Compiler\ErrorMessages\ConstructorTests.fs" />
<Compile Include="Compiler\ErrorMessages\ClassesTests.fs" />
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.