xcode 5 语法高亮不适用于单元测试文件 [英] xcode 5 syntax highlight not working for unit test file

查看:72
本文介绍了xcode 5 语法高亮不适用于单元测试文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为我的项目设置了单元测试.最初我在编译测试文件的过程中遇到了错误,最后我解决了这个问题,我的测试现在可以工作了.

I have setup a unit test for my project. Initially i got stuck with errors during the compilation of the test file, finally i solved it and my tests now are working.

现在的问题是语法高亮不适用于测试文件,仅适用于测试文件.我尝试按照这个 answer 来解决这个问题,但没有成功.删除项目的派生数据一次有效,但后来我关闭了 xcode,当我重新打开它时,再次没有语法高亮显示.此外,我 2 天前从 App Store 重新安装了 xcode 5,所以这应该是全新安装.你能帮我吗?

The problem now is that the syntax highlight is not working for the test file, only for that. I tried following this answer to solve this issue but no luck. Removing the derived data of the project worked one time but then i closed xcode and when i reopened it there was no syntax highlight again. Also i have reinstalled xcode 5 from App Store 2 days ago so this should be a fresh new install. Can you help me?

推荐答案

对我来说,当我将测试目标添加到方案编辑器(产品->方案->编辑方案..)中的测试操作时,这个问题就消失了.

For me this issue went away when I added my Test target to the Test action in the Scheme editor (Product->Scheme->Edit Scheme..).

请参阅此帖子中的图片:

See the picture at this post:

http://www.stewgleadow.com/blog/2011/10/30/adding-unit-tests-to-an-existing-ios-project/

这篇关于xcode 5 语法高亮不适用于单元测试文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆