Mercurial > touhou
comparison src/th06/anm0_vm.rs @ 645:7bde50132735
Don’t hardcode my home directory in tests.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sat, 03 Aug 2019 22:44:36 +0200 |
parents | 01849ffd0180 |
children | 7d92730bf543 |
comparison
equal
deleted
inserted
replaced
644:f983a4c98410 | 645:7bde50132735 |
---|---|
412 use std::io::{self, Read}; | 412 use std::io::{self, Read}; |
413 use std::fs::File; | 413 use std::fs::File; |
414 | 414 |
415 #[test] | 415 #[test] |
416 fn anm_runner() { | 416 fn anm_runner() { |
417 let file = File::open("/home/linkmauve/games/pc/東方/TH06 ~ The Embodiment of Scarlet Devil/CM/player01.anm").unwrap(); | 417 let file = File::open("EoSD/CM/player01.anm").unwrap(); |
418 let mut file = io::BufReader::new(file); | 418 let mut file = io::BufReader::new(file); |
419 let mut buf = vec![]; | 419 let mut buf = vec![]; |
420 file.read_to_end(&mut buf).unwrap(); | 420 file.read_to_end(&mut buf).unwrap(); |
421 let anm0 = Anm0::from_slice(&buf).unwrap(); | 421 let anm0 = Anm0::from_slice(&buf).unwrap(); |
422 assert_eq!(anm0.size, (256, 256)); | 422 assert_eq!(anm0.size, (256, 256)); |