Make test class work only on one class
已回答
Hello, I have a question. When I make a test class to a test a certain class and I have other classes in that same file, and lets say these other classes have some error in them. In the test Class, I only want to reference the class I want to test but my program doesn't work because it sees the other classes which I'm not testing have errors. How do I make sure that other classes which I'm not testing will not affect the test class..
请先登录再写评论。
Classes need to be located into their corresponding files, not in the same file.
Then you can enable partial compilation as described at https://stackoverflow.com/a/16784855/104891 .