@@ -1342,6 +1342,42 @@ TEST_F(ProcessBehaviorNodeTest, BinaryOpNodeProduct) {
13421342 EXPECT_THAT (stack_, ElementsAre (NullNodeValueMatcher ()));
13431343}
13441344
1345+ TEST_F (ProcessBehaviorNodeTest, BinaryOpNodeMin) {
1346+ BrushBehavior::BinaryOpNode binary_op_node = {
1347+ .operation = BrushBehavior::BinaryOp::kMin };
1348+
1349+ stack_.push_back (2 .0f );
1350+ stack_.push_back (3 .0f );
1351+ ProcessBehaviorNode (binary_op_node, context_);
1352+ EXPECT_THAT (stack_, ElementsAre (2 .0f ));
1353+
1354+ // `kMin` returns null when either of the two inputs is null.
1355+ stack_.push_back (kNullBehaviorNodeValue );
1356+ ProcessBehaviorNode (binary_op_node, context_);
1357+ EXPECT_THAT (stack_, ElementsAre (NullNodeValueMatcher ()));
1358+ stack_.push_back (1 .0f );
1359+ ProcessBehaviorNode (binary_op_node, context_);
1360+ EXPECT_THAT (stack_, ElementsAre (NullNodeValueMatcher ()));
1361+ }
1362+
1363+ TEST_F (ProcessBehaviorNodeTest, BinaryOpNodeMax) {
1364+ BrushBehavior::BinaryOpNode binary_op_node = {
1365+ .operation = BrushBehavior::BinaryOp::kMax };
1366+
1367+ stack_.push_back (2 .0f );
1368+ stack_.push_back (3 .0f );
1369+ ProcessBehaviorNode (binary_op_node, context_);
1370+ EXPECT_THAT (stack_, ElementsAre (3 .0f ));
1371+
1372+ // `kMax` returns null when either of the two inputs is null.
1373+ stack_.push_back (kNullBehaviorNodeValue );
1374+ ProcessBehaviorNode (binary_op_node, context_);
1375+ EXPECT_THAT (stack_, ElementsAre (NullNodeValueMatcher ()));
1376+ stack_.push_back (1 .0f );
1377+ ProcessBehaviorNode (binary_op_node, context_);
1378+ EXPECT_THAT (stack_, ElementsAre (NullNodeValueMatcher ()));
1379+ }
1380+
13451381TEST_F (ProcessBehaviorNodeTest, InterpolationNodeLerp) {
13461382 BrushBehavior::InterpolationNode interpolation_node = {
13471383 .interpolation = BrushBehavior::Interpolation::kLerp ,
0 commit comments