Home | History | Annotate | Download | only in Index
      1 // RUN: rm -rf %t
      2 // RUN: mkdir %t
      3 // RUN: c-index-test -test-load-source all -comments-xml-schema=%S/../../bindings/xml/comment-xml-schema.rng %s > %t/out
      4 // RUN: FileCheck %s < %t/out
      5 // rdar://13647476
      6 
      7 //! NSObject is root of all.
      8 @interface NSObject
      9 @end
     10 // CHECK:  CommentAST=[
     11 // CHECK-NEXT:    (CXComment_FullComment
     12 // CHECK-NEXT:       (CXComment_Paragraph
     13 // CHECK-NEXT:         (CXComment_Text Text=[ NSObject is root of all.])))]
     14 
     15 //! An umbrella class for super classes.
     16 @interface SuperClass 
     17 @end
     18 // CHECK:  CommentAST=[
     19 // CHECK-NEXT:    (CXComment_FullComment
     20 // CHECK-NEXT:       (CXComment_Paragraph
     21 // CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
     22 
     23 @interface SubClass : SuperClass
     24 @end
     25 // CHECK:  CommentAST=[
     26 // CHECK-NEXT:    (CXComment_FullComment
     27 // CHECK-NEXT:       (CXComment_Paragraph
     28 // CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
     29 
     30 @interface SubSubClass : SubClass
     31 @end
     32 // CHECK:  CommentAST=[
     33 // CHECK-NEXT:    (CXComment_FullComment
     34 // CHECK-NEXT:       (CXComment_Paragraph
     35 // CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
     36 
     37 @interface SubSubClass (Private)
     38 @end
     39 // CHECK:  CommentAST=[
     40 // CHECK-NEXT:    (CXComment_FullComment
     41 // CHECK-NEXT:       (CXComment_Paragraph
     42 // CHECK-NEXT:         (CXComment_Text Text=[ An umbrella class for super classes.])))]
     43 
     44 //! Something valuable to the organization.
     45 class Asset {
     46 };
     47 // CHECK:  CommentAST=[
     48 // CHECK-NEXT:    (CXComment_FullComment
     49 // CHECK-NEXT:       (CXComment_Paragraph
     50 // CHECK-NEXT:         (CXComment_Text Text=[ Something valuable to the organization.])))]
     51 
     52 //! An individual human or human individual.
     53 class Person : public Asset {
     54 };
     55 // CHECK:  CommentAST=[
     56 // CHECK-NEXT:    (CXComment_FullComment
     57 // CHECK-NEXT:       (CXComment_Paragraph
     58 // CHECK-NEXT:         (CXComment_Text Text=[ An individual human or human individual.])))]
     59 
     60 class Student : public Person {
     61 };
     62 // CHECK:  CommentAST=[
     63 // CHECK-NEXT:    (CXComment_FullComment
     64 // CHECK-NEXT:       (CXComment_Paragraph
     65 // CHECK-NEXT:         (CXComment_Text Text=[ An individual human or human individual.])))]
     66 
     67 //! Every thing is a part
     68 class Parts {
     69 };
     70 // CHECK:  CommentAST=[
     71 // CHECK-NEXT:    (CXComment_FullComment
     72 // CHECK-NEXT:       (CXComment_Paragraph
     73 // CHECK-NEXT:         (CXComment_Text Text=[ Every thing is a part])))]
     74 
     75 class Window : public virtual Parts {
     76 };
     77 // CHECK:  CommentAST=[
     78 // CHECK-NEXT:    (CXComment_FullComment
     79 // CHECK-NEXT:       (CXComment_Paragraph
     80 // CHECK-NEXT:         (CXComment_Text Text=[ Every thing is a part])))]
     81 
     82 class Door : public virtual Parts {
     83 };
     84 // CHECK:  CommentAST=[
     85 // CHECK-NEXT:    (CXComment_FullComment
     86 // CHECK-NEXT:       (CXComment_Paragraph
     87 // CHECK-NEXT:         (CXComment_Text Text=[ Every thing is a part])))]
     88 
     89 class House : public Window, Door {
     90 };
     91 // CHECK:  CommentAST=[
     92 // CHECK-NEXT:    (CXComment_FullComment
     93 // CHECK-NEXT:       (CXComment_Paragraph
     94 // CHECK-NEXT:         (CXComment_Text Text=[ Every thing is a part])))]
     95 
     96 //! Any Material
     97 class Material : virtual Parts {
     98 };
     99 
    100 class Building : Window, public Material {
    101 };
    102 // CHECK:  CommentAST=[
    103 // CHECK-NEXT:    (CXComment_FullComment
    104 // CHECK-NEXT:       (CXComment_Paragraph
    105 // CHECK-NEXT:         (CXComment_Text Text=[ Any Material])))]
    106 
    107 
    108