Skip to content

Commit

Permalink
chore: organize fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Dec 16, 2023
1 parent 31cd99e commit 740c965
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 34 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 34 additions & 34 deletions src/spec/blp/Blp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ describe('Blp', () => {
describe('load', () => {
describe('pala0', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/pala0.blp');
const blp = new Blp().load('./fixture/blp/pala0.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -19,7 +19,7 @@ describe('Blp', () => {

describe('pala1', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/pala1.blp');
const blp = new Blp().load('./fixture/blp/pala1.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -32,7 +32,7 @@ describe('Blp', () => {

describe('pala4', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/pala4.blp');
const blp = new Blp().load('./fixture/blp/pala4.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -45,7 +45,7 @@ describe('Blp', () => {

describe('pala8', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/pala8.blp');
const blp = new Blp().load('./fixture/blp/pala8.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -58,7 +58,7 @@ describe('Blp', () => {

describe('dxt1a', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/dxt1a.blp');
const blp = new Blp().load('./fixture/blp/dxt1a.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -71,7 +71,7 @@ describe('Blp', () => {

describe('dxt3', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/dxt3.blp');
const blp = new Blp().load('./fixture/blp/dxt3.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -84,7 +84,7 @@ describe('Blp', () => {

describe('dxt5', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/dxt5.blp');
const blp = new Blp().load('./fixture/blp/dxt5.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -97,7 +97,7 @@ describe('Blp', () => {

describe('raw', () => {
test('should load blp from valid file', () => {
const blp = new Blp().load('./fixture/raw.blp');
const blp = new Blp().load('./fixture/blp/raw.blp');

expect(blp.magic).toBe('BLP2');
expect(blp.formatVersion).toBe(1);
Expand All @@ -112,7 +112,7 @@ describe('Blp', () => {
describe('getImage', () => {
describe('pala0', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/pala0.blp');
const blp = new Blp().load('./fixture/blp/pala0.blp');

const image = blp.getImage();

Expand All @@ -123,7 +123,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/pala0.blp');
const blp = new Blp().load('./fixture/blp/pala0.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -145,7 +145,7 @@ describe('Blp', () => {

describe('pala1', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/pala1.blp');
const blp = new Blp().load('./fixture/blp/pala1.blp');

const image = blp.getImage();

Expand All @@ -156,7 +156,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/pala1.blp');
const blp = new Blp().load('./fixture/blp/pala1.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -178,7 +178,7 @@ describe('Blp', () => {

describe('pala4', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/pala4.blp');
const blp = new Blp().load('./fixture/blp/pala4.blp');

const image = blp.getImage();

Expand All @@ -189,7 +189,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/pala4.blp');
const blp = new Blp().load('./fixture/blp/pala4.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -211,7 +211,7 @@ describe('Blp', () => {

describe('pala8', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/pala8.blp');
const blp = new Blp().load('./fixture/blp/pala8.blp');

const image = blp.getImage();

Expand All @@ -222,7 +222,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/pala8.blp');
const blp = new Blp().load('./fixture/blp/pala8.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -244,7 +244,7 @@ describe('Blp', () => {

describe('dxt1a', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/dxt1a.blp');
const blp = new Blp().load('./fixture/blp/dxt1a.blp');

const image = blp.getImage();

Expand All @@ -255,7 +255,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/dxt1a.blp');
const blp = new Blp().load('./fixture/blp/dxt1a.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -277,7 +277,7 @@ describe('Blp', () => {

describe('dxt3', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/dxt3.blp');
const blp = new Blp().load('./fixture/blp/dxt3.blp');

const image = blp.getImage();

Expand All @@ -288,7 +288,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/dxt3.blp');
const blp = new Blp().load('./fixture/blp/dxt3.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -310,7 +310,7 @@ describe('Blp', () => {

describe('dxt5', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/dxt5.blp');
const blp = new Blp().load('./fixture/blp/dxt5.blp');

const image = blp.getImage();

Expand All @@ -321,7 +321,7 @@ describe('Blp', () => {
});

test('should return image for level 1 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/dxt5.blp');
const blp = new Blp().load('./fixture/blp/dxt5.blp');

const image = blp.getImage(1, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand All @@ -343,7 +343,7 @@ describe('Blp', () => {

describe('raw', () => {
test('should return image for default level and format', () => {
const blp = new Blp().load('./fixture/raw.blp');
const blp = new Blp().load('./fixture/blp/raw.blp');

const image = blp.getImage();

Expand All @@ -354,7 +354,7 @@ describe('Blp', () => {
});

test('should return image for level 0 and ABGR8888 format', () => {
const blp = new Blp().load('./fixture/raw.blp');
const blp = new Blp().load('./fixture/blp/raw.blp');

const image = blp.getImage(0, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

Expand Down Expand Up @@ -392,10 +392,10 @@ describe('Blp', () => {
});

test('should save raw blp', () => {
const blp = new Blp().load('./fixture/raw.blp');
const blp = new Blp().load('./fixture/blp/raw.blp');
const savedData = blp.save();

const originalBuffer = fs.readFileSync('./fixture/raw.blp');
const originalBuffer = fs.readFileSync('./fixture/blp/raw.blp');
const originalData = new Uint8Array(originalBuffer.buffer);

// header
Expand All @@ -406,10 +406,10 @@ describe('Blp', () => {
});

test('should save dxt blp', () => {
const blp = new Blp().load('./fixture/dxt3.blp');
const blp = new Blp().load('./fixture/blp/dxt3.blp');
const savedData = blp.save();

const originalBuffer = fs.readFileSync('./fixture/dxt3.blp');
const originalBuffer = fs.readFileSync('./fixture/blp/dxt3.blp');
const originalData = new Uint8Array(originalBuffer.buffer);

// header
Expand All @@ -420,10 +420,10 @@ describe('Blp', () => {
});

test('should save pal blp', () => {
const blp = new Blp().load('./fixture/pala4.blp');
const blp = new Blp().load('./fixture/blp/pala4.blp');
const savedData = blp.save();

const originalBuffer = fs.readFileSync('./fixture/pala4.blp');
const originalBuffer = fs.readFileSync('./fixture/blp/pala4.blp');
const originalData = new Uint8Array(originalBuffer.buffer);

// header
Expand All @@ -437,7 +437,7 @@ describe('Blp', () => {
describe('setImage', () => {
describe('raw', () => {
test('should set image with given ARGB8888 source and mipmap generation disabled', () => {
const srcBlp = new Blp().load('./fixture/raw.blp');
const srcBlp = new Blp().load('./fixture/blp/raw.blp');
const srcImage = srcBlp.getImage(0, BLP_IMAGE_FORMAT.IMAGE_ARGB8888);

const dstBlp = new Blp();
Expand All @@ -455,7 +455,7 @@ describe('Blp', () => {
});

test('should set image with given ARGB8888 source and mipmap generation enabled', () => {
const srcBlp = new Blp().load('./fixture/raw.blp');
const srcBlp = new Blp().load('./fixture/blp/raw.blp');
const srcImage = srcBlp.getImage(0, BLP_IMAGE_FORMAT.IMAGE_ARGB8888);

const dstBlp = new Blp();
Expand All @@ -473,7 +473,7 @@ describe('Blp', () => {
});

test('should set image with given ABGR8888 source and mipmap generation disabled', () => {
const srcBlp = new Blp().load('./fixture/raw.blp');
const srcBlp = new Blp().load('./fixture/blp/raw.blp');
const srcImage = srcBlp.getImage(0, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

const dstBlp = new Blp();
Expand All @@ -491,7 +491,7 @@ describe('Blp', () => {
});

test('should set image with given ABGR8888 source and mipmap generation enabled', () => {
const srcBlp = new Blp().load('./fixture/raw.blp');
const srcBlp = new Blp().load('./fixture/blp/raw.blp');
const srcImage = srcBlp.getImage(0, BLP_IMAGE_FORMAT.IMAGE_ABGR8888);

const dstBlp = new Blp();
Expand Down

0 comments on commit 740c965

Please sign in to comment.