5#include "testing/testing.h"
19class StructureTypeInferenceTest :
public bke::BlenderGTestBase {};
23 Main *bmain =
nullptr;
48 storage.input_type = socket_type;
63 *field_node.output_by_identifier(
"Exists"_ustr),
65 *switch_node.input_by_identifier(
"Switch"_ustr));
68 return switch_node.output_by_identifier(
"Output"_ustr)->
runtime->inferred_structure_type;
71TEST_F(StructureTypeInferenceTest, GeometryOutputDoesNotBecomeField)
74 StructureType::Single);
77TEST_F(StructureTypeInferenceTest, ValueOutputCanBecomeField)
#define storage(slot, qualifiers)
bNode * node_add_node(const bContext *C, bNodeTree &ntree, UString idname, std::optional< int > unique_identifier=std::nullopt)
bNodeLink & node_add_link(bNodeTree &ntree, bNode &fromnode, bNodeSocket &fromsock, bNode &tonode, bNodeSocket &tosock)
bNodeTree * node_tree_add_tree(Main *bmain, StringRef name, StringRef idname)
static bNode & add_switch_node(Main &bmain, bNodeTree &tree, const eNodeSocketDatatype socket_type)
static StructureType infer_switch_output_structure_with_field_condition(const eNodeSocketDatatype socket_type)
TEST_F(BundleTest, DefaultBundle)
static bNode & add_field_boolean_node(bNodeTree &tree)
BMesh const char void * data
void BKE_ntree_update_after_single_tree_change(Main &bmain, bNodeTree &modified_tree, const NodeTreeUpdateExtraParams ¶ms={})
void BKE_main_free(Main *bmain)
EXPECT_EQ(BLI_expr_pylike_eval(expr, nullptr, 0, &result), EXPR_PYLIKE_INVALID)
bke::bNodeRuntime * runtime