Permalink
Browse files

use mexopencv.root instead of hardcoded paths

  • Loading branch information...
amroamroamro committed Jan 4, 2013
1 parent 116e3c9 commit 0584696c83fb3bab2d61c7aa18efa123dc00a50b
Showing with 5 additions and 8 deletions.
  1. +1 −1 +cv/make.m
  2. +2 −5 test/UnitTest.m
  3. +2 −2 utils/MDoc.m
View
@@ -10,7 +10,7 @@ function make(varargin)
%
cwd = pwd;
-cd(fileparts(fileparts(mfilename('fullpath'))));
+cd(mexopencv.root());
if ispc % Windows
% Clean
View
@@ -4,17 +4,14 @@
% cd test;
% UnitTest;
properties (Constant)
- ROOT = fileparts(mfilename('fullpath'))
- TESTDIR = [UnitTest.ROOT,filesep,'unit_tests']
- BINDIR = [fileparts(UnitTest.ROOT),filesep,'matlab']
+ TESTDIR = fullfile(mexopencv.root(),'test','unit_tests');
end
methods
function obj = UnitTest()
%UNITTEST execute all unit tests
addpath(UnitTest.TESTDIR);
- addpath(fileparts(UnitTest.ROOT));
- d = dir([UnitTest.TESTDIR,filesep,'*.m']);
+ d = dir(fullfile(UnitTest.TESTDIR,'*.m'));
for i = 1:numel(d)
class_name = strrep(d(i).name,'.m','');
fprintf('== %s ======\n',class_name);
View
@@ -14,7 +14,7 @@
properties (Constant)
% Directory to place documentation
- DIR = fullfile('doc','matlab')
+ DIR = fullfile(mexopencv.root(),'doc','matlab')
% Default CSS file
CSS = fullfile(matlabroot,'toolbox','matlab','helptools',...
'private','helpwin.css')
@@ -43,7 +43,7 @@
this.process_index();
% Get a list of functions
- list = dir('+cv/*.m');
+ list = dir(fullfile(mexopencv.root(),'+cv','*.m'));
this.yet = strrep({list.name},'.m','');
while ~isempty(this.yet)
fname = this.yet{1};

0 comments on commit 0584696

Please sign in to comment.