diff --git a/test/test/spec/const_spec.rb b/test/test/spec/const_spec.rb index 2bb7c087..f9966351 100644 --- a/test/test/spec/const_spec.rb +++ b/test/test/spec/const_spec.rb @@ -16,3 +16,15 @@ describe "Constants starting with a lower-case character" do LowerCaseConstant.should == 42 end end + +describe "#define foo @\"value\" constants (NSString)" do + it "can be retrieved" do + TestNSStringConstant.should == 'foo' + end +end + +describe "#define foo \"value\" constants (C string)" do + it "can be retrieved" do + TestStringConstant.should == 'foo' + end +end diff --git a/test/test/vendor/code/code.h b/test/test/vendor/code/code.h index 65fd21f9..6e1e8a7a 100644 --- a/test/test/vendor/code/code.h +++ b/test/test/vendor/code/code.h @@ -58,3 +58,6 @@ static inline int TestInlineFunction(int x, int y, int z) { extern int lowerCaseConstant; @interface lowerCaseClass : NSObject @end + +#define TestStringConstant "foo" +#define TestNSStringConstant @"foo"