Use the new #include_bin. Makes servo build tractably quickly again.

This commit is contained in:
Patrick Walton 2012-08-16 17:20:19 -07:00
parent a864e1be38
commit 33bc481334
2 changed files with 9 additions and 3 deletions

View file

@ -11,6 +11,8 @@ import stb_image::image::{image, load, load_from_memory};
type Image = image;
const TEST_IMAGE: [u8 * 88129] = #include_bin("test.jpeg");
fn test_image_bin() -> ~[u8] {
#include_bin("test.jpeg")
}
return vec::from_fn(88129, |i| TEST_IMAGE[i]);
}

View file

@ -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() {
#[test];