<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Rust on WhyNotHugo</title><link>https://whynothugo.nl/tags/rust/</link><description>Recent content in Rust on WhyNotHugo</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 30 Nov 2023 11:13:16 +0800</lastBuildDate><atom:link href="https://whynothugo.nl/tags/rust/posts.xml" rel="self" type="application/rss+xml"/><item><title>Measuring test coverage in Rust</title><link>https://whynothugo.nl/journal/2023/11/27/measuring-test-coverage-in-rust/</link><pubDate>Mon, 27 Nov 2023 13:10:56 +0800</pubDate><guid>https://whynothugo.nl/journal/2023/11/27/measuring-test-coverage-in-rust/</guid><description>I want to measure test coverage for the vparser library, and this is my first time measuring coverage with Rust. Some notes for future reference.
First, run the tests with instrumentation enabled:
&amp;gt; RUSTFLAGS=&amp;#34;-C instrument-coverage&amp;#34; cargo test -p vparser Compiling vparser v0.1.0 (/home/hugo/src/git.sr.ht/~whynothugo/vdirsyncer-rs/vparser) Finished test [unoptimized + debuginfo] target(s) in 0.33s Running unittests src/lib.rs (target/debug/deps/vparser-5204a1fc06fb7f74) ... In some cases, you might need to merge multiple profraw files into a single one.</description></item></channel></rss>