Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2018-05-15 15:04:29 +0300
committerbubnikv <bubnikv@gmail.com>2018-05-15 15:04:29 +0300
commit7645e9cb7a884a4722324b7b5a839424291299fb (patch)
tree1af9721290b5de7729d016b5ccb70d4b74a813f5 /t
parent3bc8d7517a0ff868b2a2731702872857dad01a44 (diff)
Added layer_num, layer_z variables to the end_gcode, end_filament_gcode,
added min(.,.), max(.,.) functions to the placeholder parser syntax.
Diffstat (limited to 't')
-rw-r--r--t/custom_gcode.t6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/custom_gcode.t b/t/custom_gcode.t
index 7c2a75f29..4c1c1b108 100644
--- a/t/custom_gcode.t
+++ b/t/custom_gcode.t
@@ -1,4 +1,4 @@
-use Test::More tests => 77;
+use Test::More tests => 81;
use strict;
use warnings;
@@ -71,6 +71,10 @@ use Slic3r::Test;
is $parser->process('{2*foo*(3-12)}'), '0', 'math: 2*foo*(3-12)';
is $parser->process('{2*bar*(3-12)}'), '-36', 'math: 2*bar*(3-12)';
ok abs($parser->process('{2.5*bar*(3-12)}') - -45) < 1e-7, 'math: 2.5*bar*(3-12)';
+ is $parser->process('{min(12, 14)}'), '12', 'math: min(12, 14)';
+ is $parser->process('{max(12, 14)}'), '14', 'math: max(12, 14)';
+ is $parser->process('{min(13.4, -1238.1)}'), '-1238.1', 'math: min(13.4, -1238.1)';
+ is $parser->process('{max(13.4, -1238.1)}'), '13.4', 'math: max(13.4, -1238.1)';
# Test the boolean expression parser.
is $parser->evaluate_boolean_expression('12 == 12'), 1, 'boolean expression parser: 12 == 12';