Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
univariate_coefficient_basis.test.cpp
Go to the documentation of this file.
3#include "univariate.hpp"
4#include <gtest/gtest.h>
5
6using namespace bb;
7
8template <typename FF> class UnivariateCoefficientBasisTest : public testing::Test {
9 public:
10 template <size_t view_length> using UnivariateView = UnivariateView<FF, view_length>;
11};
12
13using FieldTypes = testing::Types<fr>;
15
17{
20
21 Univariate<fr, 2> expected({ a0, a1 });
23 Univariate<fr, 2> result(uni_m);
24 EXPECT_EQ(result, expected);
25}
26
28{
29 Univariate<fr, 2> f1{ { 1, 2 } };
30 Univariate<fr, 2> f2{ { 3, 4 } };
33
34 Univariate<fr, 2> result(f1_m + f2_m);
35 Univariate<fr, 2> expected = f1 + f2;
36 EXPECT_EQ(result, expected);
37}
38
40{
41
42 Univariate<fr, 2> f1({ 1, 2 });
43 Univariate<fr, 2> f2({ 3, 4 });
46
47 Univariate<fr, 3> result(f1_m * f2_m);
48 Univariate<fr, 3> expected = (f1.template extend_to<3>()) * (f2.template extend_to<3>());
49 EXPECT_EQ(result, expected);
50}
UnivariateView< FF, view_length > UnivariateView
A view of a univariate, also used to truncate univariates.
A univariate polynomial represented by its values on {0, 1,..., domain_end - 1}.
testing::Types< bb::fr > FieldTypes
Entry point for Barretenberg command-line interface.
Definition api.hpp:5
TYPED_TEST_SUITE(CommitmentKeyTest, Curves)
TYPED_TEST(CommitmentKeyTest, CommitToZeroPoly)
static field random_element(numeric::RNG *engine=nullptr) noexcept