Browse Source

Removed empty unit tests

Thomas Buck 10 years ago
parent
commit
e8b26392bf
6 changed files with 32 additions and 142 deletions
  1. 4
    23
      src/Light.cpp
  2. 0
    24
      src/OpenGLMesh.cpp
  3. 0
    2
      src/OpenGLMesh.h
  4. 0
    22
      src/SDLSystem.cpp
  5. 28
    50
      src/SkeletalModel.cpp
  6. 0
    21
      src/World.cpp

+ 4
- 23
src/Light.cpp View File

1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
2
 /*================================================================
2
 /*================================================================
3
- * 
3
+ *
4
  * Project : Freyja
4
  * Project : Freyja
5
  * Author  : Terry 'Mongoose' Hendrix II
5
  * Author  : Terry 'Mongoose' Hendrix II
6
  * Website : http://www.westga.edu/~stu7440/
6
  * Website : http://www.westga.edu/~stu7440/
10
  * Comments: This is the GL light class
10
  * Comments: This is the GL light class
11
  *
11
  *
12
  *
12
  *
13
- *           This file was generated using Mongoose's C++ 
13
+ *           This file was generated using Mongoose's C++
14
  *           template generator script.  <stu7440@westga.edu>
14
  *           template generator script.  <stu7440@westga.edu>
15
- * 
16
- *-- History ------------------------------------------------- 
15
+ *
16
+ *-- History -------------------------------------------------
17
  *
17
  *
18
  * 2002.01.27:
18
  * 2002.01.27:
19
  * Mongoose - Created
19
  * Mongoose - Created
31
 {
31
 {
32
 }
32
 }
33
 
33
 
34
-
35
-////////////////////////////////////////////////////////////
36
-// Unit Test code
37
-////////////////////////////////////////////////////////////
38
-
39
-#ifdef LIGHT_UNIT_TEST
40
-int runLightUnitTest(int argc, char *argv[])
41
-{
42
-	return 0;
43
-}
44
-
45
-
46
-int main(int argc, char *argv[])
47
-{
48
-	printf("[Light class test]\n");
49
-
50
-	return runLightUnitTest(argc, argv);
51
-}
52
-#endif

+ 0
- 24
src/OpenGLMesh.cpp View File

2
  * \file OpenGLMesh.cpp
2
  * \file OpenGLMesh.cpp
3
  * \brief OpenGL Mesh
3
  * \brief OpenGL Mesh
4
  *
4
  *
5
- * Defining UNIT_TEST_OPENGLMESH builds OpenGLMesh class as a console unit test
6
- *
7
  * \author Mongoose
5
  * \author Mongoose
8
  */
6
  */
9
 
7
 
620
 // Private Mutators
618
 // Private Mutators
621
 ////////////////////////////////////////////////////////////
619
 ////////////////////////////////////////////////////////////
622
 
620
 
623
-
624
-////////////////////////////////////////////////////////////
625
-// Unit Test code
626
-////////////////////////////////////////////////////////////
627
-
628
-#ifdef UNIT_TEST_OPENGLMESH
629
-int runOpenGLMeshUnitTest(int argc, char *argv[])
630
-{
631
-	return 0;
632
-}
633
-
634
-
635
-int main(int argc, char *argv[])
636
-{
637
-	OpenGLMesh test;
638
-
639
-
640
-	printf("[OpenGLMesh class test]\n");
641
-
642
-	return runOpenGLMeshUnitTest(argc, argv);
643
-}
644
-#endif

+ 0
- 2
src/OpenGLMesh.h View File

2
  * \file OpenGLMesh.h
2
  * \file OpenGLMesh.h
3
  * \brief OpenGL Mesh
3
  * \brief OpenGL Mesh
4
  *
4
  *
5
- * Defining UNIT_TEST_OPENGLMESH builds OpenGLMesh class as a console unit test
6
- *
7
  * \author Mongoose
5
  * \author Mongoose
8
  *
6
  *
9
  * \todo Unify the parallel systems here, arrays and the allocate/set
7
  * \todo Unify the parallel systems here, arrays and the allocate/set

+ 0
- 22
src/SDLSystem.cpp View File

642
 	SDL_GL_SwapBuffers();
642
 	SDL_GL_SwapBuffers();
643
 }
643
 }
644
 
644
 
645
-
646
-////////////////////////////////////////////////////////////
647
-// Unit Test code
648
-////////////////////////////////////////////////////////////
649
-
650
-#ifdef __UNIT_TEST__
651
-int SDL::unitTest(int argc, char *argv[])
652
-{
653
-	return 0;
654
-}
655
-
656
-
657
-int main(int argc, char *argv[])
658
-{
659
-	SDL test;
660
-
661
-
662
-	printf("[SDL class test]\n");
663
-
664
-	return test._UnitTest(argc, argv);
665
-}
666
-#endif

+ 28
- 50
src/SkeletalModel.cpp View File

1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
2
 /*================================================================
2
 /*================================================================
3
- * 
3
+ *
4
  * Project : OpenRaider
4
  * Project : OpenRaider
5
  * Author  : Terry 'Mongoose' Hendrix II
5
  * Author  : Terry 'Mongoose' Hendrix II
6
  * Website : http://www.westga.edu/~stu7440/
6
  * Website : http://www.westga.edu/~stu7440/
10
  * Comments: This is the factored out skeletal model class
10
  * Comments: This is the factored out skeletal model class
11
  *
11
  *
12
  *
12
  *
13
- *           This file was generated using Mongoose's C++ 
13
+ *           This file was generated using Mongoose's C++
14
  *           template generator script.  <stu7440@westga.edu>
14
  *           template generator script.  <stu7440@westga.edu>
15
- * 
16
- *-- History ------------------------------------------------- 
15
+ *
16
+ *-- History -------------------------------------------------
17
  *
17
  *
18
  * 2003.05.19:
18
  * 2003.05.19:
19
  * Mongoose - Created
19
  * Mongoose - Created
30
 {
30
 {
31
 	model = 0x0;
31
 	model = 0x0;
32
 	flags = 0;
32
 	flags = 0;
33
-	mBoneFrame = 0;  
33
+	mBoneFrame = 0;
34
 	mAnimationFrame = 0;
34
 	mAnimationFrame = 0;
35
 	mIdleAnimation = 0;
35
 	mIdleAnimation = 0;
36
 }
36
 }
45
 			  model->animation.next())
45
 			  model->animation.next())
46
 		{
46
 		{
47
 			animation_frame_t *af = model->animation.current();
47
 			animation_frame_t *af = model->animation.current();
48
-			
48
+
49
 			if (!af)
49
 			if (!af)
50
 				continue;
50
 				continue;
51
-			
51
+
52
 			for (af->frame.start(); af->frame.forward(); af->frame.next())
52
 			for (af->frame.start(); af->frame.forward(); af->frame.next())
53
 			{
53
 			{
54
 				bone_frame_t *bf = af->frame.current();
54
 				bone_frame_t *bf = af->frame.current();
55
-				
55
+
56
 				if (!bf)
56
 				if (!bf)
57
 					continue;
57
 					continue;
58
 
58
 
59
 				bf->tag.erase();
59
 				bf->tag.erase();
60
-				
60
+
61
 				//for (bf->tag.start(); bf->tag.forward(); bf->tag.next())
61
 				//for (bf->tag.start(); bf->tag.forward(); bf->tag.next())
62
 				//{
62
 				//{
63
 				//	if (bf->tag.current())
63
 				//	if (bf->tag.current())
64
 				//		delete bf->tag.current();
64
 				//		delete bf->tag.current();
65
 				//}
65
 				//}
66
-				
66
+
67
 				delete bf;
67
 				delete bf;
68
 			}
68
 			}
69
-			
69
+
70
 			af->frame.clear();
70
 			af->frame.clear();
71
-			
71
+
72
 			delete af;
72
 			delete af;
73
 		}
73
 		}
74
-		
74
+
75
 		model->animation.clear();
75
 		model->animation.clear();
76
-		
76
+
77
 		delete model;
77
 		delete model;
78
 	}
78
 	}
79
 }
79
 }
83
 // Public Accessors
83
 // Public Accessors
84
 ////////////////////////////////////////////////////////////
84
 ////////////////////////////////////////////////////////////
85
 
85
 
86
-int SkeletalModel::getAnimation() 
86
+int SkeletalModel::getAnimation()
87
 {
87
 {
88
-	return mAnimationFrame; 
88
+	return mAnimationFrame;
89
 }
89
 }
90
 
90
 
91
 
91
 
92
-int SkeletalModel::getFrame() 
93
-{ 
94
-	return mBoneFrame; 
92
+int SkeletalModel::getFrame()
93
+{
94
+	return mBoneFrame;
95
 }
95
 }
96
 
96
 
97
 
97
 
98
-int SkeletalModel::getIdleAnimation() 
99
-{ 
100
-	return mIdleAnimation; 
98
+int SkeletalModel::getIdleAnimation()
99
+{
100
+	return mIdleAnimation;
101
 }
101
 }
102
 
102
 
103
 
103
 
116
 {
116
 {
117
 	if (!model) // index > (int)model->animation.size())
117
 	if (!model) // index > (int)model->animation.size())
118
 		return;
118
 		return;
119
-	
119
+
120
 	animation_frame_t *a = model->animation[index];
120
 	animation_frame_t *a = model->animation[index];
121
-	
121
+
122
 	if (a)
122
 	if (a)
123
 	{
123
 	{
124
 		mAnimationFrame = index;
124
 		mAnimationFrame = index;
134
 		return;
134
 		return;
135
 
135
 
136
 	animation_frame_t *a = model->animation[mAnimationFrame];
136
 	animation_frame_t *a = model->animation[mAnimationFrame];
137
-	
137
+
138
 	if (a) // index > (int)a->frame.size())
138
 	if (a) // index > (int)a->frame.size())
139
 	{
139
 	{
140
 		bone_frame_t *b = a->frame[index];
140
 		bone_frame_t *b = a->frame[index];
141
-		
141
+
142
 		if (b)
142
 		if (b)
143
 		{
143
 		{
144
 			mBoneFrame = index;
144
 			mBoneFrame = index;
151
 {
151
 {
152
 	if (!model)
152
 	if (!model)
153
 		return;
153
 		return;
154
-	
154
+
155
 	animation_frame_t *a = model->animation[index];
155
 	animation_frame_t *a = model->animation[index];
156
-	
156
+
157
 	if (a)
157
 	if (a)
158
 	{
158
 	{
159
 		mIdleAnimation = index;
159
 		mIdleAnimation = index;
170
 // Private Mutators
170
 // Private Mutators
171
 ////////////////////////////////////////////////////////////
171
 ////////////////////////////////////////////////////////////
172
 
172
 
173
-
174
-////////////////////////////////////////////////////////////
175
-// Unit Test code
176
-////////////////////////////////////////////////////////////
177
-
178
-#ifdef UNIT_TEST_SKELETALMODEL
179
-int runSkeletalModelUnitTest(int argc, char *argv[])
180
-{
181
-	SkeletalModel test;
182
-
183
-	return 0;
184
-}
185
-
186
-
187
-int main(int argc, char *argv[])
188
-{
189
-	printf("[SkeletalModel class test]\n");
190
-	runSkeletalModelUnitTest(argc, argv);
191
-
192
-	return 0;
193
-}
194
-#endif

+ 0
- 21
src/World.cpp View File

772
 	mModels.clear();
772
 	mModels.clear();
773
 }
773
 }
774
 
774
 
775
-
776
-////////////////////////////////////////////////////////////
777
-// Unit Test code
778
-////////////////////////////////////////////////////////////
779
-
780
-#ifdef UNIT_TEST_WORLD
781
-int runWorldUnitTest(int argc, char *argv[])
782
-{
783
-	return 0;
784
-}
785
-
786
-
787
-int main(int argc, char *argv[])
788
-{
789
-	printf("[World class test]\n");
790
-
791
-	runWorldUnitTest(argc, argv);
792
-
793
-	return 0;
794
-}
795
-#endif

Loading…
Cancel
Save