This repository has been archived by the owner on Apr 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
finish save-restore testing, rename all save-restore tests
- Loading branch information
Showing
27 changed files
with
785 additions
and
11 deletions.
There are no files selected for viewing
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
__tests__/CanvasRenderingContext2D.save-restore.shadowBlur.ts
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,12 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
|
||
run<number>({ | ||
name: "shadowBlur", | ||
values: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6], | ||
getValue(wasm): number { | ||
return wasm.getShadowBlur(); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setShadowBlur(value); | ||
}, | ||
}); |
13 changes: 13 additions & 0 deletions
13
__tests__/CanvasRenderingContext2D.save-restore.shadowColor.ts
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,13 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
|
||
|
||
run<string>({ | ||
name: "shadowColor", | ||
values: ["one", "two", "three", "four", "five"], | ||
getValue(wasm): string { | ||
return wasm.getString(wasm.getShadowColor()); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setShadowColor(wasm.newString(value)); | ||
}, | ||
}); |
12 changes: 12 additions & 0 deletions
12
__tests__/CanvasRenderingContext2D.save-restore.shadowOffsetX.ts
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,12 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
|
||
run<number>({ | ||
name: "shadowOffsetX", | ||
values: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6], | ||
getValue(wasm): number { | ||
return wasm.getShadowOffsetX(); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setShadowOffsetX(value); | ||
}, | ||
}); |
12 changes: 12 additions & 0 deletions
12
__tests__/CanvasRenderingContext2D.save-restore.shadowOffsetY.ts
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,12 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
|
||
run<number>({ | ||
name: "shadowOffsetY", | ||
values: [0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6], | ||
getValue(wasm): number { | ||
return wasm.getShadowOffsetY(); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setShadowOffsetY(value); | ||
}, | ||
}); |
13 changes: 13 additions & 0 deletions
13
__tests__/CanvasRenderingContext2D.save-restore.strokeStyle.ts
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,13 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
|
||
|
||
run<string>({ | ||
name: "strokeStyle", | ||
values: ["one", "two", "three", "four", "five"], | ||
getValue(wasm): string { | ||
return wasm.getString(wasm.getStrokeStyle()); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setStrokeStyle(wasm.newString(value)); | ||
}, | ||
}); |
19 changes: 19 additions & 0 deletions
19
__tests__/CanvasRenderingContext2D.save-restore.textAlign.ts
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,19 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
import { TextAlign } from "../src"; | ||
|
||
run<TextAlign>({ | ||
name: "textAlign", | ||
values: [ | ||
TextAlign.center, | ||
TextAlign.end, | ||
TextAlign.left, | ||
TextAlign.right, | ||
TextAlign.start, | ||
], | ||
getValue(wasm): TextAlign { | ||
return wasm.getTextAlign(); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setTextAlign(value); | ||
}, | ||
}); |
20 changes: 20 additions & 0 deletions
20
__tests__/CanvasRenderingContext2D.save-restore.textBaseline.ts
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,20 @@ | ||
import { run } from "./__setup__/saveRestore"; | ||
import { TextBaseline } from "../src"; | ||
|
||
run<TextBaseline>({ | ||
name: "textBaseline", | ||
values: [ | ||
TextBaseline.alphabetic, | ||
TextBaseline.bottom, | ||
TextBaseline.hanging, | ||
TextBaseline.ideographic, | ||
TextBaseline.middle, | ||
TextBaseline.top, | ||
], | ||
getValue(wasm): TextBaseline { | ||
return wasm.getTextBaseline(); | ||
}, | ||
setValue(wasm, value): void { | ||
wasm.setTextBaseline(value); | ||
}, | ||
}); |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.