From 79ce3bd883508f7a8b2f63e06003f32776acaee9 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Wed, 17 Apr 2019 12:04:36 +0200 Subject: [PATCH] Deprecate the old testing posts --- .../posts/{ => deprecated}/04-unit-testing/index.md | 4 ++++ .../posts/{ => deprecated}/05-integration-tests/index.md | 0 2 files changed, 4 insertions(+) rename blog/content/second-edition/posts/{ => deprecated}/04-unit-testing/index.md (98%) rename blog/content/second-edition/posts/{ => deprecated}/05-integration-tests/index.md (100%) diff --git a/blog/content/second-edition/posts/04-unit-testing/index.md b/blog/content/second-edition/posts/deprecated/04-unit-testing/index.md similarity index 98% rename from blog/content/second-edition/posts/04-unit-testing/index.md rename to blog/content/second-edition/posts/deprecated/04-unit-testing/index.md index deea9afa..63e68f3e 100644 --- a/blog/content/second-edition/posts/04-unit-testing/index.md +++ b/blog/content/second-edition/posts/deprecated/04-unit-testing/index.md @@ -18,6 +18,10 @@ This blog is openly developed on [GitHub]. If you have any problems or questions +## Requirements + +In this post we explore how to execute `cargo test` on the host system. This only works if you don't have a default target set in your `.cargo/config` file. If you don't have a `.cargo/config` file in your project, you're fine too. + ## Unit Tests for `no_std` Binaries Rust has a [built-in test framework] that is capable of running unit tests without the need to set anything up. Just create a function that checks some results through assertions and add the `#[test]` attribute to the function header. Then `cargo test` will automatically find and execute all test functions of your crate. diff --git a/blog/content/second-edition/posts/05-integration-tests/index.md b/blog/content/second-edition/posts/deprecated/05-integration-tests/index.md similarity index 100% rename from blog/content/second-edition/posts/05-integration-tests/index.md rename to blog/content/second-edition/posts/deprecated/05-integration-tests/index.md