Remove Unit Tests in XCode 8 - xcode8

XCode auto-generates unit tests for projects, and these OFTEN fail due to bugs in XCode/OSX etc (plus, we have external unit testing an all of our "important" source code)
I want to completely remove these auto-generated unit tests from the project, but it seems that the strategies used for each previous version of xcode no longer exist with XCode8.
Does anyone know how to disable/remove the auto-generated "Tests" folder created by XCode in XCode 8?

Of course, I found the answer immediately after posting the question.
What I was missing is I hadn't clicked here:
Which opened up the targets menu, where I could delete targets.
Before clicking it looked like this:
And afterwards, I could see the targets view.

Related

Difference between Rust compile modes [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I'm new to Rust.
As I used to code a lot in Jetbrains IDEs (of course with Ideavim), I decide to pick up a Jetbrains IDE for Rust too, be more specificly CLion(as I also have to write C++ sometimes). Here you can treat CLion like Intellij or Pycharm/Rubymine/Android-studio if you are not fammiliar with it, because afterall what really does the work is the Rust plugin powered by LLDB.
Today I encountered a very strange thing:
I have wrote a library in C, which works fine in a C++ project. In my new Rust project, I want to keep using it, as a dynamic library. It compiles well, but it behaves strange, like, sometimes the logging to std does not work, the file operation does not work, and something more.
After some more investigation, I found out my test cases will:
Fail if I run through CLion/Intellij Run selected configuration
Fail if I run through CLI cargo test -- --nocapture
Pass if I run through CLI cargo test --release -- --nocapture
Pass if I run through CLion/Intellij Debug selected configuration
Here Intellij Debug behaves like cargo --release, Run behaves like cargo(without --release), have no idea why.
You may suspect that that's because I wrote some build-type-depending codes, but at least it's not true in the Rust part. As to the C library, it already been compiled, I do not think different rust compile types will change something inside it.
I checked the Rust configuration in CLion, found no items concerns to build mode.
OK, that's the context, and here comes my questions:
What's the difference between Intellij Run selected configuration/Debug selected configuration for Rust by default
Why Intellij Debug/Run behaves opposing to cargo --release/cargo
What may cause the different behaving between compile mode while I have no mode-depending codes in Rust.(no third party crates here)
For those who encountered similar problems, well not only in Rust, but also other programming langues, I found the reason for the different behaivors:
Dynamic library mess
I name it like this, not sure if it is correct, but to describe that multiple versions of the same dynamic library lay in your computers different paths may cause strange problems like I've encountered.
If you are in a situation like this, use ldd to check the library dependancies.
And also, remember to cleanup all the caches.

Baffling Xcode Plugin build trouble

I'm trying to build an Xcode plugin using this template. As a matter of fact the template works perfectly, but the problem is that something strange happened and it stopped loading the plugin. After 3 hours of trial & error, I pinpointed the problem but I cannot get my head around this...
I have a class called MHStatement and when I build without including this class, the plugin works fine and appears in the Xcode menu bar as expected.
However, when I include the MHStatement.h and MHStatement.m files in the project and then build, the plugin fails to load.
Now the fun part is that if I rename MHStatement to Statement and build it still doesn't work.
But if I make a new interface & implementation Statement overwriting the above Statement files it works again.
Moreover, creating new classes named _MHStatement, __MHStatement, MXStatement, MBStatment, MHFatment also make it fail, but XXStatement, DDStatement, XHStatement is OK.
But when I create a class XXStatement, and refactor->rename it to MHStatement and build,
the plugin loads normally.
This is obviously some weird runtime or linking error, but I don't know how to even start looking for what exactly is happening.
I am not sure if this is reproducible by any means, so I would just kindly ask for any advice that might come to your minds.
Cheers!
EDIT
I tried creating a new class MHStatement and adding it to BBUncustify plugin. Building the plugin like this also prevents it to load, but now I'm getting this warning
objc[6278]: Class MHStatement is implemented in both /Users/marko/Library/Application Support/Developer/Shared/Xcode/Plug-ins/UncrustifyPlugin.xcplugin/Contents/MacOS/UncrustifyPlugin and /Users/marko/Library/Application Support/Developer/Shared/Xcode/Plug-ins/PluginTest3.xcplugin/Contents/MacOS/PluginTest3. One of the two will be used. Which one is undefined.
with tail -f /var/log/system.log
I ended up creating a new project from scratch, and now have 3 separate targets, a framework for the code base that actually does all the work, test cases for the framework, and a simple one class plugin target, which works fine with that setup.
I hope some day someone will be able to answer what exactly was happening, and Apple will become kinder to Xcode modding community.

intellisense fails for file added to NUnit[Lite] project in Xamarin/Mono

I'm trying out Xamarin (on Mac OS X) to do some cross-platform (Mac, iOS, Android) development in Mono. I've created a "Point" class inside a "Filament" namespace, and now I'm trying to add unit tests.
There appear to be two approaches to unit testing in the Mono world: NUnit and NUnitLite. I've tried both (in the latter case, following this tutorial), with the same result, which is this:
In my unit test project, I add a link to the Point.cs file (by right-clicking the project, using 'Add...', selecting the file, and then choosing the "Add as Link" option). In my unit test file (PointTest.cs), I add "using Filament;" to the top of the file. But despite the fact that I can now use the Point class, and it successfully compiles, Intellisense seems completely oblivious to it -- every time I start to type "Point" it extends this to "PointTest", and when I doggedly change it back to Point, it draws it in red like an error.
In fact, the same trouble happened on my "using" line; I typed "using Filament" and it changed this to "using FilamentTestsiOS" (the namespace of my unit test project).
This is driving me nuts... but as a complete noob to Mono, Xamarin, NUnit, and NUnitLite, I'm sure I'm doing something stupid.
What's the correct way to set up a C#/Mono unit test, so that both intellisense and the compiler will recognize the classes for which I'm writing tests?

Where is the error list in Intellij IDEA?

I used to develop a habit in Eclipse to use Error List to check errors and warnings. Is there something like that in IntelliJ IDEA? I don't see it.
Eclipse incrementally builds the whole project all the time and finds all compilation errors even in classes you haven't touched/opened at all.
IntelliJ is not building your whole code base upon every change so there is no such view. The closest you can get is Messages view (available under Alt + 0) but it only shows compilation errors discovered when a file with errors was physically opened (or when the whole project was built).
UPDATE
IntelliJ IDEA 12 will most likely have incremental compilation feature:
Currently supported: incremental compilation of Java, Groovy, resource copying, UI Designer forms, Artifacts, Android, annotation processing, not-null instrumentation
It's also possible to look at tiny red stripes on the scrollbar to find where the errors in a file are located (they couldn't make it less convenient to use :/)

Replicate class with main method as in Java IDE within Objective-C and Xcode 4

I have a simple question. Coming from a java background and having worked extensively with eclipse, netbeans or any other java IDE, is quite nice to have the possibility to add a main method to a class and execute it within the IDE, with just a click, and see the output.
I was looking for the same possibility within xcode4/objective-c but I couldn't find a way. From time to time, I like testing small piece of software, without compiling and running the whole project.
As I am still "thinking" in Java, could you suggest the proper way to achieve this with xcode4 from an "objective-c developer point of view" ?
thanks
There's not really a lightweight way to do this, but you have two options that I can think of depending on whether you want to keep the harness code you've written.
If you do, then you'd need to make a new target in your project for each class you drive with a harness, and have that target build just the class you are driving and a simple file with just the main code to drive that class.
If you don't, then you could make a target with a main, and each time you want to drive a different class, change which files are built, change the code in main, and rebuild.
This is assuming that you want to avoid both running and compiling the rest of your code. If you don't mind compiling everything, you could have one test-harness target that builds all of your classes, and either change main on the fly, or use #ifdefs or a runtime argument to decide which helper code to run.