Skip to content

Commit

Permalink
add second file to test list in linter
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-erojaslizano committed Apr 2, 2024
1 parent 8706d37 commit 7477992
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
using System;
using System.Text;
using Snowflake.Data.Core;

namespace Snowflake.Data.Core
{
public class ExampleClassToTestNewLinterPipeline2
{

// Cache for maximum performance
public static Encoding UTF8 = Encoding.UTF8;

Check warning on line 11 in Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs#L11

Added line #L11 was not covered by tests

public byte[] Buffer;
public int offset;
public int length;

public ExampleClassToTestNewLinterPipeline2(byte[] Buffer, int Offset, int Length)
{
this.Buffer = Buffer;
this.offset = Offset;
this.length = Length;
}

Check warning on line 22 in Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs#L17-L22

Added lines #L17 - L22 were not covered by tests

public ExampleClassToTestNewLinterPipeline2(byte[] Buffer)
{
this.Buffer = Buffer;
this.offset = 0;
this.length = Buffer.Length;
}

Check warning on line 29 in Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs#L24-L29

Added lines #L24 - L29 were not covered by tests

public override string ToString() => UTF8.GetString(Buffer, offset, length);

Check warning on line 31 in Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs#L31

Added line #L31 was not covered by tests

public byte[] GetBytes()
{

Check warning on line 34 in Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs#L34

Added line #L34 was not covered by tests
// Return a new byte array containing only the relevant part of the buffer
var result = new byte[length];
Array.Copy(Buffer, offset, result, 0, length);
return result;
}

Check warning on line 39 in Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs

View check run for this annotation

Codecov / codecov/patch

Snowflake.Data/Core/ExampleClassToTestNewLinterPipeline2.cs#L36-L39

Added lines #L36 - L39 were not covered by tests

}
}

0 comments on commit 7477992

Please sign in to comment.