summaryrefslogtreecommitdiff
path: root/morphology-img/tests/config.rs
diff options
context:
space:
mode:
authorjacksonfu14 <jackson@fashionunited.com>2025-11-17 08:55:46 +0100
committerJackson Moore <jacksonmoore@tuta.io>2025-11-17 08:55:46 +0100
commit7087c4f7da3749f12a2daa1e1de1c7f947e91638 (patch)
tree99011c9b8a936076396733e5145ec241f53def7d /morphology-img/tests/config.rs
parente37f7ba671f3e80396e7a4ac3a461365bd0ca78a (diff)
feature: ly parallel processing
Diffstat (limited to 'morphology-img/tests/config.rs')
-rw-r--r--morphology-img/tests/config.rs56
1 files changed, 56 insertions, 0 deletions
diff --git a/morphology-img/tests/config.rs b/morphology-img/tests/config.rs
index 6302cb0..7cc71cb 100644
--- a/morphology-img/tests/config.rs
+++ b/morphology-img/tests/config.rs
@@ -240,3 +240,59 @@ fn test_max_batch_size_field_is_public() {
let _batch_size = config.max_batch_size;
assert_eq!(_batch_size, Some(15));
}
+
+#[test]
+fn test_default_parallel_is_false() {
+ let config = RenderConfig::default();
+ assert!(!config.parallel);
+}
+
+#[test]
+fn test_builder_parallel_true() {
+ let config = RenderConfig::new("output")
+ .parallel(true);
+
+ assert!(config.parallel);
+ assert_eq!(config.output_dir, PathBuf::from("output"));
+}
+
+#[test]
+fn test_builder_parallel_false() {
+ let config = RenderConfig::new("output")
+ .parallel(false);
+
+ assert!(!config.parallel);
+}
+
+#[test]
+fn test_builder_parallel_overwrites() {
+ let config = RenderConfig::new("output")
+ .parallel(true)
+ .parallel(false); // Override previous value
+
+ assert!(!config.parallel);
+}
+
+#[test]
+fn test_builder_with_all_options_including_parallel() {
+ let config = RenderConfig::new("my-output")
+ .keep_temp_files(true)
+ .lilypond_binary("/usr/bin/lilypond")
+ .max_batch_size(25)
+ .parallel(true);
+
+ assert_eq!(config.output_dir, PathBuf::from("my-output"));
+ assert!(config.keep_temp_files);
+ assert_eq!(config.lilypond_binary, PathBuf::from("/usr/bin/lilypond"));
+ assert_eq!(config.max_batch_size, Some(25));
+ assert!(config.parallel);
+}
+
+#[test]
+fn test_parallel_field_is_public() {
+ let config = RenderConfig::new("output").parallel(true);
+
+ // Should be able to access field directly
+ let _parallel = config.parallel;
+ assert!(_parallel);
+}