--- /dev/null
+#include "nest/Expr.h"
+
+nest::Expr operator+(const nest::Expr &lhs, const nest::Expr &rhs)
+{
+ return std::make_shared<nest::expr::AddNode>(lhs, rhs);
+}
--- /dev/null
+#include "nest/Expr.h"
+
+#include <memory>
+
+#include <gtest/gtest.h>
+
+namespace
+{
+struct DummyNode final : public nest::expr::Node
+{
+};
+}
+
+TEST(EXPR, operator_sum)
+{
+ auto left = std::make_shared<DummyNode>();
+ auto right = std::make_shared<DummyNode>();
+
+ auto expr = left + right;
+
+ ASSERT_NE(expr->asAdd(), nullptr);
+
+ auto add = expr->asAdd();
+
+ ASSERT_EQ(add->lhs().get(), left.get());
+ ASSERT_EQ(add->rhs().get(), right.get());
+}