Use target-type new.
This commit is contained in:
@@ -7,7 +7,7 @@ public class Day01_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day01 day = new Day01();
|
||||
Day01 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"1721",
|
||||
@@ -28,7 +28,7 @@ public class Day01_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day01 day = new Day01();
|
||||
Day01 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"1721",
|
||||
|
||||
@@ -7,7 +7,7 @@ public class Day02_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day02 day = new Day02();
|
||||
Day02 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"1-3 a: abcde",
|
||||
@@ -25,7 +25,7 @@ public class Day02_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day02 day = new Day02();
|
||||
Day02 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"1-3 a: abcde",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day03_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day03 day = new Day03();
|
||||
Day03 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"..##.......",
|
||||
@@ -27,7 +27,7 @@ public class Day03_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day03 day = new Day03();
|
||||
Day03 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"..##.......",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day04_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day04 day = new Day04();
|
||||
Day04 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"ecl:gry pid:860033327 eyr:2020 hcl:#fffffd",
|
||||
@@ -29,7 +29,7 @@ public class Day04_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__ExampleInvalid()
|
||||
{
|
||||
Day04 day = new Day04();
|
||||
Day04 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"eyr:1972 cid:100",
|
||||
@@ -53,7 +53,7 @@ public class Day04_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__ExampleValid()
|
||||
{
|
||||
Day04 day = new Day04();
|
||||
Day04 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"pid:087499704 hgt:74in ecl:grn iyr:2012 eyr:2030 byr:1980",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day05_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example1()
|
||||
{
|
||||
Day05 day = new Day05();
|
||||
Day05 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"FBFBBFFRLR",
|
||||
@@ -17,7 +17,7 @@ public class Day05_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example2()
|
||||
{
|
||||
Day05 day = new Day05();
|
||||
Day05 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"BFFFBBFRRR",
|
||||
@@ -29,7 +29,7 @@ public class Day05_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example3()
|
||||
{
|
||||
Day05 day = new Day05();
|
||||
Day05 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"FFFBBBFRRR",
|
||||
@@ -41,7 +41,7 @@ public class Day05_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example4()
|
||||
{
|
||||
Day05 day = new Day05();
|
||||
Day05 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"BBFFBBFRLL",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day06_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day06 day = new Day06();
|
||||
Day06 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"abc",
|
||||
@@ -31,7 +31,7 @@ public class Day06_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day06 day = new Day06();
|
||||
Day06 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"abc",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day07_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day07 day = new Day07();
|
||||
Day07 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"light red bags contain 1 bright white bag, 2 muted yellow bags.",
|
||||
@@ -25,7 +25,7 @@ public class Day07_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day07 day = new Day07();
|
||||
Day07 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"shiny gold bags contain 2 dark red bags.",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day08_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day08 day = new Day08();
|
||||
Day08 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"nop +0",
|
||||
@@ -25,7 +25,7 @@ public class Day08_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day08 day = new Day08();
|
||||
Day08 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"nop +0",
|
||||
|
||||
@@ -5,7 +5,7 @@ public class Day09_Tests
|
||||
[Fact]
|
||||
public void ResolvePart1__Example()
|
||||
{
|
||||
Day09 day = new Day09();
|
||||
Day09 day = new();
|
||||
|
||||
string result = day.ResolvePart1([
|
||||
"35",
|
||||
@@ -36,7 +36,7 @@ public class Day09_Tests
|
||||
[Fact]
|
||||
public void ResolvePart2__Example()
|
||||
{
|
||||
Day09 day = new Day09();
|
||||
Day09 day = new();
|
||||
|
||||
string result = day.ResolvePart2([
|
||||
"35",
|
||||
|
||||
Reference in New Issue
Block a user