From fd91a1c273b7595f74e4eebac9497b10e0a75e9f Mon Sep 17 00:00:00 2001
From: Henry Gressmann <mail@henrygressmann.de>
Date: Sun, 28 Jan 2024 22:52:23 +0100
Subject: [PATCH] docs: fix chart title

Signed-off-by: Henry Gressmann <mail@henrygressmann.de>
---
 crates/tinywasm/tests/charts/progress.rs         | 4 ++--
 crates/tinywasm/tests/generate-charts.rs         | 2 ++
 crates/tinywasm/tests/generated/progress-2.0.svg | 2 +-
 crates/tinywasm/tests/generated/progress-mvp.svg | 8 ++++----
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/crates/tinywasm/tests/charts/progress.rs b/crates/tinywasm/tests/charts/progress.rs
index 0bc66a6..1ecc09c 100644
--- a/crates/tinywasm/tests/charts/progress.rs
+++ b/crates/tinywasm/tests/charts/progress.rs
@@ -6,7 +6,7 @@ use std::path::Path;
 
 const FONT: &str = "Victor Mono";
 
-pub fn create_progress_chart(csv_path: &Path, output_path: &Path) -> Result<()> {
+pub fn create_progress_chart(name: &str, csv_path: &Path, output_path: &Path) -> Result<()> {
     let file = File::open(csv_path)?;
     let reader = io::BufReader::new(file);
 
@@ -41,7 +41,7 @@ pub fn create_progress_chart(csv_path: &Path, output_path: &Path) -> Result<()>
         .y_label_area_size(70)
         .margin(10)
         .margin_top(20)
-        .caption("MVP TESTSUITE", (FONT, 30.0, FontStyle::Bold))
+        .caption(name, (FONT, 30.0, FontStyle::Bold))
         .build_cartesian_2d((0..(versions.len() - 1) as u32).into_segmented(), 0..max_tests)?;
 
     chart
diff --git a/crates/tinywasm/tests/generate-charts.rs b/crates/tinywasm/tests/generate-charts.rs
index 27c0782..ec48703 100644
--- a/crates/tinywasm/tests/generate-charts.rs
+++ b/crates/tinywasm/tests/generate-charts.rs
@@ -12,6 +12,7 @@ fn generate_charts() -> Result<()> {
     }
 
     charts::create_progress_chart(
+        "WebAssembly 1.0 Test Suite",
         std::path::Path::new("./tests/generated/mvp.csv"),
         std::path::Path::new("./tests/generated/progress-mvp.svg"),
     )?;
@@ -19,6 +20,7 @@ fn generate_charts() -> Result<()> {
     println!("created progress chart: ./tests/generated/progress-mvp.svg");
 
     charts::create_progress_chart(
+        "WebAssembly 2.0 Test Suite",
         std::path::Path::new("./tests/generated/2.0.csv"),
         std::path::Path::new("./tests/generated/progress-2.0.svg"),
     )?;
diff --git a/crates/tinywasm/tests/generated/progress-2.0.svg b/crates/tinywasm/tests/generated/progress-2.0.svg
index e8e9313..c869fcb 100644
--- a/crates/tinywasm/tests/generated/progress-2.0.svg
+++ b/crates/tinywasm/tests/generated/progress-2.0.svg
@@ -1,7 +1,7 @@
 <svg width="1000" height="400" viewBox="0 0 1000 400" xmlns="http://www.w3.org/2000/svg">
 <rect x="0" y="0" width="1000" height="400" opacity="1" fill="#FFFFFF" stroke="none"/>
 <text x="500" y="25" dy="0.76em" text-anchor="middle" font-family="Victor Mono" font-size="24.193548387096776" opacity="1" fill="#000000" font-weight="bold">
-MVP TESTSUITE
+WebAssembly 2.0 Test Suite
 </text>
 <text x="10" y="199" dy="0.76em" text-anchor="middle" font-family="Victor Mono" font-size="12.096774193548388" opacity="1" fill="#000000" font-weight="bold" transform="rotate(270, 10, 199)">
 Tests Passed
diff --git a/crates/tinywasm/tests/generated/progress-mvp.svg b/crates/tinywasm/tests/generated/progress-mvp.svg
index d9697ed..b8a3e35 100644
--- a/crates/tinywasm/tests/generated/progress-mvp.svg
+++ b/crates/tinywasm/tests/generated/progress-mvp.svg
@@ -1,7 +1,7 @@
 <svg width="1000" height="400" viewBox="0 0 1000 400" xmlns="http://www.w3.org/2000/svg">
 <rect x="0" y="0" width="1000" height="400" opacity="1" fill="#FFFFFF" stroke="none"/>
 <text x="500" y="25" dy="0.76em" text-anchor="middle" font-family="Victor Mono" font-size="24.193548387096776" opacity="1" fill="#000000" font-weight="bold">
-MVP TESTSUITE
+WebAssembly 1.0 Test Suite
 </text>
 <text x="10" y="199" dy="0.76em" text-anchor="middle" font-family="Victor Mono" font-size="12.096774193548388" opacity="1" fill="#000000" font-weight="bold" transform="rotate(270, 10, 199)">
 Tests Passed
@@ -56,9 +56,9 @@ v0.2.0 (19344)
 v0.3.0 (20254)
 </text>
 <polyline fill="none" opacity="1" stroke="#000000" stroke-width="1" points="898,345 898,350 "/>
-<rect x="630" y="68" width="172" height="276" opacity="0.5" fill="#0000FF" stroke="none"/>
-<rect x="448" y="92" width="172" height="252" opacity="0.5" fill="#0000FF" stroke="none"/>
 <rect x="812" y="54" width="172" height="290" opacity="0.5" fill="#0000FF" stroke="none"/>
-<rect x="266" y="185" width="172" height="159" opacity="0.5" fill="#0000FF" stroke="none"/>
 <rect x="85" y="212" width="171" height="132" opacity="0.5" fill="#0000FF" stroke="none"/>
+<rect x="266" y="185" width="172" height="159" opacity="0.5" fill="#0000FF" stroke="none"/>
+<rect x="630" y="68" width="172" height="276" opacity="0.5" fill="#0000FF" stroke="none"/>
+<rect x="448" y="92" width="172" height="252" opacity="0.5" fill="#0000FF" stroke="none"/>
 </svg>