зеркало из https://github.com/mozilla/gecko-dev.git
servo: Use the new #include_bin. Makes servo build tractably quickly again.
Source-Repo: https://github.com/servo/servo Source-Revision: 33bc4813347a05241b2aa25e7d50509bd972f44b
This commit is contained in:
Родитель
407ea7e9a1
Коммит
7e1fd74623
|
@ -11,6 +11,8 @@ import stb_image::image::{image, load, load_from_memory};
|
||||||
|
|
||||||
type Image = image;
|
type Image = image;
|
||||||
|
|
||||||
|
const TEST_IMAGE: [u8 * 88129] = #include_bin("test.jpeg");
|
||||||
|
|
||||||
fn test_image_bin() -> ~[u8] {
|
fn test_image_bin() -> ~[u8] {
|
||||||
#include_bin("test.jpeg")
|
return vec::from_fn(88129, |i| TEST_IMAGE[i]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,11 @@ class Font {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn test_font_bin() -> ~[u8] { #include_bin("JosefinSans-SemiBold.ttf") }
|
const TEST_FONT: [u8 * 33004] = #include_bin("JosefinSans-SemiBold.ttf");
|
||||||
|
|
||||||
|
fn test_font_bin() -> ~[u8] {
|
||||||
|
return vec::from_fn(33004, |i| TEST_FONT[i]);
|
||||||
|
}
|
||||||
|
|
||||||
fn should_destruct_on_fail_without_leaking() {
|
fn should_destruct_on_fail_without_leaking() {
|
||||||
#[test];
|
#[test];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче