Skip to content

Commit

Permalink
Adds Instances.test.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
kenorb committed Sep 10, 2024
1 parent f54be8f commit b74eaeb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Storage/Instances.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ template <typename T>
#ifdef __MQL__
T* Instances::instances[];
#else
T* Instances<T>::instances[];
//T* Instances<T>::instances[];
ARRAY(T*, Instances<T>::instances);
#endif

#endif // INSTANCES_H
41 changes: 41 additions & 0 deletions Storage/tests/Instances.test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
//+------------------------------------------------------------------+
//| EA31337 framework |
//| Copyright 2016-2024, EA31337 Ltd |
//| https://ea31337.github.io |
//+------------------------------------------------------------------+

/*
* This file is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

/**
* @file
* Test C++ compilation of Instances class.
*/

// Includes.
#include "../Instances.h"

int main(int argc, char **argv) {
// Create a new object.
// Instances *obj = new Instances();

// @todo: Add more tests.
// ...

// Clean up.
// Instances::Delete(obj);

return 0;
}

0 comments on commit b74eaeb

Please sign in to comment.