File: TestProfileItems.cpp

package info (click to toggle)
bornagain 23.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 103,936 kB
  • sloc: cpp: 423,131; python: 40,997; javascript: 11,167; awk: 630; sh: 318; ruby: 173; xml: 130; makefile: 51; ansic: 24
file content (18 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "GUI/Model/Sample/ProfileItems.h"
#include "Tests/GTestWrapper/google_test.h"

TEST(ProfileItems, Profile1DCauchy)
{
    // to domain
    Profile1DCauchyItem item;
    item.setOmega(2.0);
    auto pdf = item.createProfile();
    const auto* cauchy = dynamic_cast<Profile1DCauchy*>(pdf.get());
    EXPECT_EQ(cauchy->omega(), 2.0);

    // from domain
    Profile1DCauchy pdf2(3.0);
    Profile1DCauchyItem item2;
    item2.setOmega(pdf2.omega());
    EXPECT_EQ(item2.omega(), 3.0);
}