Browse Source

Merge branch 'master' into js/fix-resize-namespace

pull/590/head
James Jackson-South 8 years ago
parent
commit
c277cee88d
  1. 4
      .travis.yml
  2. 14
      README.md
  3. 25
      appveyor.yml
  4. 4
      tests/ImageSharp.Tests/ImageSharp.Tests.csproj
  5. 28
      tests/ImageSharp.Tests/PixelFormats/PackedPixelTests.cs

4
.travis.yml

@ -6,7 +6,7 @@ matrix:
- os: linux # Ubuntu 14.04
dist: trusty
sudo: required
dotnet: 2.1.4
dotnet: 2.1.300-rc1-008673
mono: latest
# - os: osx # OSX 10.11
# osx_image: xcode7.3.1
@ -21,7 +21,7 @@ branches:
script:
- git submodule -q update --init
- dotnet restore
- dotnet test tests/ImageSharp.Tests/ImageSharp.Tests.csproj -c Release -f "netcoreapp2.0"
- dotnet test tests/ImageSharp.Tests/ImageSharp.Tests.csproj -c Release -f "netcoreapp2.1"
env:
global:

14
README.md

@ -115,17 +115,21 @@ For more examples check out:
### Manual build
If you prefer, you can compile ImageSharp yourself (please do and help!), you'll need:
If you prefer, you can compile ImageSharp yourself (please do and help!)
- [Visual Studio 2017 (or above)](https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes)
- The [.NET Core SDK Installer](https://www.microsoft.com/net/core#windows) - Non VSCode link.
- Using [Visual Studio 2017 Preview](https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-preview-relnotes)
- Make sure you have the latest version installed
- Make sure you have [the newest 2.1 RC1 SDK installed](https://www.microsoft.com/net/core#windows)
Alternatively on Linux you can use:
- Using [Visual Studio 2017](https://www.visualstudio.com/en-us/news/releasenotes/vs2017-relnotes)
- If you are unable and/or don't want to build ImageSharp.Tests against 2.1 RC, remove the `netcoreapp2.1` target [from TargetFrameworks](https://github.com/SixLabors/ImageSharp/blob/master/tests/ImageSharp.Tests/ImageSharp.Tests.csproj#L3) locally
Alternatively, you can work from command line and/or with a lightweight editor on **both Linux/Unix and Windows**:
- [Visual Studio Code](https://code.visualstudio.com/) with [C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)
- [.Net Core](https://www.microsoft.com/net/core#linuxubuntu)
To clone it locally click the "Clone in Windows" button above or run the following git commands.
To clone ImageSharp locally click the "Clone in Windows" button above or run the following git commands.
```bash
git clone https://github.com/SixLabors/ImageSharp

25
appveyor.yml

@ -6,16 +6,29 @@ skip_branch_with_pr: true
environment:
matrix:
### TODO: Enable the netcoreapp2.1 target when RC2 has been released!
#- target_framework: netcoreapp2.1
# is_32bit: False
#- target_framework: netcoreapp2.1
# is_32bit: True
- target_framework: netcoreapp2.0
is_32bit: False
- target_framework: net471
is_32bit: False
- target_framework: net471
is_32bit: True
- target_framework: net462
is_32bit: False
- target_framework: net462
is_32bit: True
- target_framework: net471
is_32bit: False
- target_framework: netcoreapp2.0
is_32bit: False
#- target_framework: netcoreapp2.0 # As far as I understand, 32 bit test execution is not supported by "dotnet xunit"
# is_32bit: True
#- target_framework: mono
@ -39,7 +52,7 @@ install:
before_build:
- git submodule -q update --init
- cmd: dotnet --version
- cmd: dotnet --info
build_script:
- cmd: build.cmd
@ -60,4 +73,4 @@ deploy:
secure: V/lEHP0UeMWIpWd0fiNlY2IgbCnJKQlGdRksECdJbOBdaE20Fl0RNL7WyqHe02o4
artifact: /.*\.nupkg/
on:
branch: master
branch: master

4
tests/ImageSharp.Tests/ImageSharp.Tests.csproj

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net471;netcoreapp2.0;net462;net47</TargetFrameworks>
<TargetFrameworks>net471;netcoreapp2.0;netcoreapp2.1;net47;net462</TargetFrameworks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<LangVersion>7.2</LangVersion>
<DebugType Condition="$(codecov) != ''">full</DebugType>
@ -52,4 +52,4 @@
<ItemGroup>
<Folder Include="TestUtilities\Factories\" />
</ItemGroup>
</Project>
</Project>

28
tests/ImageSharp.Tests/PixelFormats/PackedPixelTests.cs

@ -700,6 +700,15 @@ namespace SixLabors.ImageSharp.Tests.Colors
[Fact]
public void NormalizedByte4()
{
if (TestEnvironment.IsLinux)
{
// Can't decide if these assertions are robust enough to be portable across CPU architectures.
// Let's just skip it for 32 bits!
// TODO: Someone should review this!
// see https://github.com/SixLabors/ImageSharp/issues/594
return;
}
// Test PackedValue
Assert.Equal((uint)0x0, new NormalizedByte4(Vector4.Zero).PackedValue);
Assert.Equal((uint)0x7F7F7F7F, new NormalizedByte4(Vector4.One).PackedValue);
@ -847,6 +856,15 @@ namespace SixLabors.ImageSharp.Tests.Colors
[Fact]
public void NormalizedShort4()
{
if (TestEnvironment.IsLinux)
{
// Can't decide if these assertions are robust enough to be portable across CPU architectures.
// Let's just skip it for 32 bits!
// TODO: Someone should review this!
// see https://github.com/SixLabors/ImageSharp/issues/594
return;
}
// Test PackedValue
Assert.Equal((ulong)0x0, new NormalizedShort4(Vector4.Zero).PackedValue);
Assert.Equal((ulong)0x7FFF7FFF7FFF7FFF, new NormalizedShort4(Vector4.One).PackedValue);
@ -1135,6 +1153,7 @@ namespace SixLabors.ImageSharp.Tests.Colors
// Can't decide if these assertions are robust enough to be portable across CPU architectures.
// Let's just skip it for 32 bits!
// TODO: Someone should review this!
// see https://github.com/SixLabors/ImageSharp/issues/594
return;
}
@ -1265,6 +1284,15 @@ namespace SixLabors.ImageSharp.Tests.Colors
[Fact]
public void Short4()
{
if (TestEnvironment.IsLinux)
{
// Can't decide if these assertions are robust enough to be portable across CPU architectures.
// Let's just skip it for 32 bits!
// TODO: Someone should review this!
// see https://github.com/SixLabors/ImageSharp/issues/594
return;
}
// Test the limits.
Assert.Equal((ulong)0x0, new Short4(Vector4.Zero).PackedValue);
Assert.Equal((ulong)0x7FFF7FFF7FFF7FFF, new Short4(Vector4.One * 0x7FFF).PackedValue);

Loading…
Cancel
Save