MCPcopy Create free account
hub / github.com/audacity/audacity / BeatsCase

Function BeatsCase

libraries/lib-snapping/tests/SnappingTest.cpp:30–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void BeatsCase(
31 AudacityProject& project, const char* format, double time, double expected,
32 bool nearest, int upper, int lower)
33{
34 auto& timeSignature = ProjectTimeSignature::Get(project);
35
36 timeSignature.SetTempo(60.0);
37 timeSignature.SetUpperTimeSignature(upper);
38 timeSignature.SetLowerTimeSignature(lower);
39
40 REQUIRE(
41 SnapFunctionsRegistry::Snap(format, project, time, nearest).snapped);
42
43 REQUIRE(
44 SnapFunctionsRegistry::Snap(format, project, time, nearest).time ==
45 Approx(expected));
46}
47
48void TimeStepCase(
49 const AudacityProject& project, const char* format, double time,

Callers 1

SnappingTest.cppFile · 0.85

Calls 5

GetFunction · 0.85
SnapClass · 0.85
SetTempoMethod · 0.80
SetUpperTimeSignatureMethod · 0.80
SetLowerTimeSignatureMethod · 0.80

Tested by

no test coverage detected