-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proper temporary files, remove hardcoded paths
- Loading branch information
1 parent
5af43e7
commit 36109f6
Showing
8 changed files
with
170 additions
and
132 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package vips | ||
|
||
import ( | ||
"io/ioutil" | ||
"path/filepath" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func Test_ICCProfileLengths(t *testing.T) { | ||
assert.Equal(t, len(sRGBV2MicroICCProfile), sRGBV2MicroICCProfileLength) | ||
assert.Equal(t, len(sGrayV2MicroICCProfile), sGrayV2MicroICCProfileLength) | ||
assert.Equal(t, len(sRGBIEC6196621ICCProfile), sRGBIEC6196621ICCProfileLength) | ||
assert.Equal(t, len(genericGrayGamma22ICCProfile), genericGrayGamma22ICCProfileLength) | ||
} | ||
|
||
func Test_ICCProfileInitialisation(t *testing.T) { | ||
initializeICCProfiles() | ||
|
||
srgbProfile, err := ioutil.ReadFile(filepath.Join(temporaryDirectory, sRGBV2MicroICCProfilePath)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, sRGBV2MicroICCProfile, srgbProfile) | ||
|
||
grayProfile, err := ioutil.ReadFile(filepath.Join(temporaryDirectory, sGrayV2MicroICCProfilePath)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, sGrayV2MicroICCProfile, grayProfile) | ||
|
||
srgbProfile2, err := ioutil.ReadFile(filepath.Join(temporaryDirectory, sRGBIEC6196621ICCProfilePath)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, sRGBIEC6196621ICCProfile, srgbProfile2) | ||
|
||
grayProfile2, err := ioutil.ReadFile(filepath.Join(temporaryDirectory, genericGrayGamma22ICCProfilePath)) | ||
assert.NoError(t, err) | ||
assert.Equal(t, genericGrayGamma22ICCProfile, grayProfile2) | ||
} |