blob: 42ce54cb037e1d21e8b8435ed2f14a9c713a8f1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Tests for Master Sync.
// There are no tests for actual deck playback, since I don't know how to mock that out yet.
// The following manual tests should probably be performed:
// * Quantize mode nudges tracks in sync, whether internal or deck master.
// * Flinging tracks with the waveform should work.
// * vinyl??
#include <gtest/gtest.h>
#include <gmock/gmock.h>
#include <QtDebug>
#include "test/mixxxtest.h"
#include "test/mockedenginebackendtest.h"
#include "engine/sync/synccontrol.h"
class SyncControlTest : public MockedEngineBackendTest {
};
TEST_F(SyncControlTest, TestDetermineBpmMultiplier) {
EXPECT_EQ(SyncControl::kBpmUnity,
m_pChannel1->getEngineBuffer()->m_pSyncControl->determineBpmMultiplier(70, 80));
EXPECT_EQ(SyncControl::kBpmHalve,
m_pChannel1->getEngineBuffer()->m_pSyncControl->determineBpmMultiplier(70, 160));
EXPECT_EQ(SyncControl::kBpmDouble,
m_pChannel1->getEngineBuffer()->m_pSyncControl->determineBpmMultiplier(70, 40));
}
|