WIP: Epiphany Refactor (#85)

This commit is contained in:
Lucien Greathouse
2018-08-26 01:03:53 -07:00
committed by GitHub
parent 80b9b7594b
commit 72bc77f1d5
52 changed files with 1145 additions and 2157 deletions

View File

@@ -0,0 +1,36 @@
#[macro_use] extern crate lazy_static;
extern crate librojo;
use std::{
collections::HashMap,
path::{Path, PathBuf},
};
use librojo::{
project::Project,
};
lazy_static! {
static ref TEST_PROJECTS_ROOT: PathBuf = {
Path::new(env!("CARGO_MANIFEST_DIR")).join("../test-projects")
};
}
#[test]
fn foo() {
let project_file_location = TEST_PROJECTS_ROOT.join("foo.json");
let project = Project::load_exact(&project_file_location).unwrap();
assert_eq!(project.name, "foo");
assert_eq!(project.tree.len(), 1);
}
#[test]
fn empty() {
let project_file_location = TEST_PROJECTS_ROOT.join("empty/roblox-project.json");
let project = Project::load_exact(&project_file_location).unwrap();
assert_eq!(project.name, "empty");
assert_eq!(project.tree.len(), 0);
}