Bladeren bron

Removed empty unit tests

Thomas Buck 10 jaren geleden
bovenliggende
commit
e8b26392bf
6 gewijzigde bestanden met toevoegingen van 32 en 142 verwijderingen
  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 Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
2 2
 /*================================================================
3
- * 
3
+ *
4 4
  * Project : Freyja
5 5
  * Author  : Terry 'Mongoose' Hendrix II
6 6
  * Website : http://www.westga.edu/~stu7440/
@@ -10,10 +10,10 @@
10 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 14
  *           template generator script.  <stu7440@westga.edu>
15
- * 
16
- *-- History ------------------------------------------------- 
15
+ *
16
+ *-- History -------------------------------------------------
17 17
  *
18 18
  * 2002.01.27:
19 19
  * Mongoose - Created
@@ -31,22 +31,3 @@ Light::~Light()
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 Bestand weergeven

@@ -2,8 +2,6 @@
2 2
  * \file OpenGLMesh.cpp
3 3
  * \brief OpenGL Mesh
4 4
  *
5
- * Defining UNIT_TEST_OPENGLMESH builds OpenGLMesh class as a console unit test
6
- *
7 5
  * \author Mongoose
8 6
  */
9 7
 
@@ -620,25 +618,3 @@ void OpenGLMesh::setVertex(unsigned int index, float x, float y, float z)
620 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 Bestand weergeven

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

+ 0
- 22
src/SDLSystem.cpp Bestand weergeven

@@ -642,25 +642,3 @@ void SDLSystem::swapBuffersGL()
642 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 Bestand weergeven

@@ -1,6 +1,6 @@
1 1
 /* -*- Mode: C++; tab-width: 3; indent-tabs-mode: t; c-basic-offset: 3 -*- */
2 2
 /*================================================================
3
- * 
3
+ *
4 4
  * Project : OpenRaider
5 5
  * Author  : Terry 'Mongoose' Hendrix II
6 6
  * Website : http://www.westga.edu/~stu7440/
@@ -10,10 +10,10 @@
10 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 14
  *           template generator script.  <stu7440@westga.edu>
15
- * 
16
- *-- History ------------------------------------------------- 
15
+ *
16
+ *-- History -------------------------------------------------
17 17
  *
18 18
  * 2003.05.19:
19 19
  * Mongoose - Created
@@ -30,7 +30,7 @@ SkeletalModel::SkeletalModel()
30 30
 {
31 31
 	model = 0x0;
32 32
 	flags = 0;
33
-	mBoneFrame = 0;  
33
+	mBoneFrame = 0;
34 34
 	mAnimationFrame = 0;
35 35
 	mIdleAnimation = 0;
36 36
 }
@@ -45,35 +45,35 @@ SkeletalModel::~SkeletalModel()
45 45
 			  model->animation.next())
46 46
 		{
47 47
 			animation_frame_t *af = model->animation.current();
48
-			
48
+
49 49
 			if (!af)
50 50
 				continue;
51
-			
51
+
52 52
 			for (af->frame.start(); af->frame.forward(); af->frame.next())
53 53
 			{
54 54
 				bone_frame_t *bf = af->frame.current();
55
-				
55
+
56 56
 				if (!bf)
57 57
 					continue;
58 58
 
59 59
 				bf->tag.erase();
60
-				
60
+
61 61
 				//for (bf->tag.start(); bf->tag.forward(); bf->tag.next())
62 62
 				//{
63 63
 				//	if (bf->tag.current())
64 64
 				//		delete bf->tag.current();
65 65
 				//}
66
-				
66
+
67 67
 				delete bf;
68 68
 			}
69
-			
69
+
70 70
 			af->frame.clear();
71
-			
71
+
72 72
 			delete af;
73 73
 		}
74
-		
74
+
75 75
 		model->animation.clear();
76
-		
76
+
77 77
 		delete model;
78 78
 	}
79 79
 }
@@ -83,21 +83,21 @@ SkeletalModel::~SkeletalModel()
83 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,9 +116,9 @@ void SkeletalModel::setAnimation(int index)
116 116
 {
117 117
 	if (!model) // index > (int)model->animation.size())
118 118
 		return;
119
-	
119
+
120 120
 	animation_frame_t *a = model->animation[index];
121
-	
121
+
122 122
 	if (a)
123 123
 	{
124 124
 		mAnimationFrame = index;
@@ -134,11 +134,11 @@ void SkeletalModel::setFrame(int index)
134 134
 		return;
135 135
 
136 136
 	animation_frame_t *a = model->animation[mAnimationFrame];
137
-	
137
+
138 138
 	if (a) // index > (int)a->frame.size())
139 139
 	{
140 140
 		bone_frame_t *b = a->frame[index];
141
-		
141
+
142 142
 		if (b)
143 143
 		{
144 144
 			mBoneFrame = index;
@@ -151,9 +151,9 @@ void SkeletalModel::setIdleAnimation(int index)
151 151
 {
152 152
 	if (!model)
153 153
 		return;
154
-	
154
+
155 155
 	animation_frame_t *a = model->animation[index];
156
-	
156
+
157 157
 	if (a)
158 158
 	{
159 159
 		mIdleAnimation = index;
@@ -170,25 +170,3 @@ void SkeletalModel::setIdleAnimation(int index)
170 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 Bestand weergeven

@@ -772,24 +772,3 @@ void World::clear()
772 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

Laden…
Annuleren
Opslaan