Skip to content

Commit

Permalink
Add compile-tests to zerocopy
Browse files Browse the repository at this point in the history
This commit just adds the framework necessary to run these tests, but
does not add any compile-tests. Tests will need to be added to complete
 #17.
  • Loading branch information
joshlf committed Sep 30, 2022
1 parent 772604d commit 3840497
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/compiletest.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2022 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

use std::path::PathBuf;

use compiletest_rs::{common::Mode, Config};

#[test]
fn ui() {
let mut config = Config {
// Uncomment to bless tests.
// bless: true,
mode: Mode::Ui,
src_base: PathBuf::from("tests/ui"),
target_rustcflags: Some("-L target/debug -L target/debug/deps".to_string()),
build_base: PathBuf::from("target/ui"),
..Default::default()
};

config.link_deps();
config.clean_rmeta();

compiletest_rs::run_tests(&config);
}

0 comments on commit 3840497

Please sign in to comment.