Skip to content

Commit 3ffa9aa

Browse files
committed
small beginning of fixes on the dot tests
1 parent ca20b19 commit 3ffa9aa

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

tests/test_computeRadialMotionDirection.m

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ function test_computeRadialMotionDirectionBasic()
1313
cfg.design.motionType = 'radial';
1414
cfg.dot.matrixWidth = 50; % in pixels
1515
cfg.screen.winWidth = 100; % in pixels
16-
direction = 666;
17-
18-
positions = [
16+
cfg.timing.eventDuration = 2;
17+
18+
dots.direction = 666;
19+
dots.positions = [
1920
100, 100 / 2; ... % middle of right side
2021
100, 100; ... % top right corner
2122
100 / 2, 100; ...
2223
0, 100 / 2; ...
2324
0, 0; ...
2425
100 / 2, 0];
2526

26-
direction = computeRadialMotionDirection(cfg, positions, direction);
27+
angleMotion = computeRadialMotionDirection(cfg, dots);
2728

2829
expectedDirection = [
2930
0; ... right
@@ -34,6 +35,6 @@ function test_computeRadialMotionDirectionBasic()
3435
-90]; % down
3536

3637
%% test
37-
assertEqual(expectedDirection, direction);
38+
assertEqual(expectedDirection, angleMotion);
3839

3940
end

tests/test_initDots.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function test_initDotsBasic()
2828
cfg.dot.lifeTime = 0.250; % in seconds
2929
cfg.dot.matrixWidth = 50; % in pixels
3030
cfg.screen.winWidth = 2000; % in pixels
31-
cfg.eventDuration = 1; % in seconds
31+
cfg.timing.eventDuration = 1; % in seconds
3232
cfg.screen.ifi = 0.01; % in seconds
3333

3434
thisEvent.direction = 0;
@@ -64,7 +64,7 @@ function test_initDotsStatic()
6464
cfg.dot.lifeTime = 0.250; % in seconds
6565
cfg.dot.matrixWidth = 50; % in pixels
6666
cfg.screen.winWidth = 2000; % in pixels
67-
cfg.eventDuration = 1; % in seconds
67+
cfg.timing.eventDuration = 1; % in seconds
6868
cfg.screen.ifi = 0.01; % in seconds
6969

7070
thisEvent.direction = -1;
@@ -94,7 +94,7 @@ function test_initDotsRadial()
9494
cfg.dot.lifeTime = 0.250; % in seconds
9595
cfg.dot.matrixWidth = 50; % in pixels
9696
cfg.screen.winWidth = 2000; % in pixels
97-
cfg.eventDuration = 1; % in seconds
97+
cfg.timing.eventDuration = 1; % in seconds
9898
cfg.screen.ifi = 0.01; % in seconds
9999

100100
thisEvent.direction = 666; % outward motion

0 commit comments

Comments
 (0)