Skip to content

Commit

Permalink
Add aliases UTs
Browse files Browse the repository at this point in the history
  • Loading branch information
CristianAmbrosini committed Jul 4, 2023
1 parent 3fb3e25 commit eb97eca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
using MyAlias = System.DateTime;

public class Program
{
Expand All @@ -16,6 +17,8 @@ void Constructors()
_ = new DateTime(1, 1, 1, 1, 1, 1, 1, new GregorianCalendar()); // Noncompliant
_ = new DateTime(1, 1, 1, 1, 1, 1, 1, DateTimeKind.Utc); // Noncompliant
_ = new DateTime(1, 1, 1, 1, 1, 1, 1, new GregorianCalendar(), DateTimeKind.Utc); // Noncompliant
_ = new MyAlias(1); // FN
_ = new System.DateTime(1); // Noncompliant
}

void Fields()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Imports System
Imports System.Globalization
Imports MyAlias = System.DateTime

Public Class Program
Private Sub Constructors()
Expand All @@ -15,6 +16,9 @@ Public Class Program
a = New DateTime(1, 1, 1, 1, 1, 1, 1, DateTimeKind.Utc) ' Noncompliant
a = New DateTime(1, 1, 1, 1, 1, 1, 1, New GregorianCalendar(), DateTimeKind.Utc) ' Noncompliant
a = New Date(1, 1, 1, 1, 1, 1, 1, New GregorianCalendar(), DateTimeKind.Utc) ' Noncompliant
a = New DateTime(1) ' Noncompliant
a = New MyAlias(1) ' FN
a = New System.DateTime(1) ' Noncompliant
End Sub

Private Sub Fields()
Expand Down

0 comments on commit eb97eca

Please sign in to comment.