mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Adapt action test fixtures to pooled render buffers
This commit is contained in:
1 parent
488ab1ab14
commit
4649808594
3 files changed
+3
-3
No files matched your search
@@ -89,7 +89,7 @@ fn atn_calculations_add_creates_alpha_with_expected_pixels_and_undo() {
|
||||
for depth in [8, 16, 32] {
|
||||
let mut s = fixture(depth);
|
||||
let before = saved(&s);
|
||||
let original = photocraft_compose::flatten(&s.active().unwrap().doc).px;
|
||||
let original = photocraft_compose::flatten(&s.active().unwrap().doc).into_px();
|
||||
assert_eq!(play(&mut s, action.clone())["ran"], 1);
|
||||
let doc = &s.active().unwrap().doc;
|
||||
assert_eq!(doc.channels.len(), 1);
|
||||
|
||||
@@ -39,7 +39,7 @@ fn fixture(depth: u32) -> Session {
|
||||
}
|
||||
|
||||
fn pixels(s: &Session) -> Vec<[f32; 4]> {
|
||||
photocraft_compose::flatten(&s.active().unwrap().doc).px
|
||||
photocraft_compose::flatten(&s.active().unwrap().doc).into_px()
|
||||
}
|
||||
|
||||
fn saved(s: &Session) -> Vec<u8> {
|
||||
|
||||
@@ -49,7 +49,7 @@ fn install_square(s: &mut Session) {
|
||||
}
|
||||
|
||||
fn pixels(s: &Session) -> Vec<[f32; 4]> {
|
||||
photocraft_compose::flatten(&s.active().unwrap().doc).px
|
||||
photocraft_compose::flatten(&s.active().unwrap().doc).into_px()
|
||||
}
|
||||
fn saved(s: &Session) -> Vec<u8> {
|
||||
photocraft_format::save_to_bytes(&s.active().unwrap().doc, &Default::default()).unwrap()
|
||||
|
||||
Reference in new issue
Block a user