OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [special/] [load-category-3a.m] - Rev 797

Go to most recent revision | Compare with Previous | Blame | View Log

/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.  */
 
/* This test is identical to load-category-2, but the classes and
   categories are created in inverted order in the modules, to test
   that you can load classes first, or categories first, and it all
   still works.  */
 
#include <stdio.h>
#include <stdlib.h>
#include <objc/objc.h>
 
#include "load-category-3.h"
 
@implementation TestClass2
+ load
{
  printf ("[TestClass2 +load]\n");
  /* Check superclasses/subclasses +load order.  */
  check_that_load_step_was_completed (0);
  check_that_load_step_was_not_completed (1);
  check_that_load_step_was_not_completed (2);
 
  /* Check that the corresponding category's +load was not done.  */
  check_that_load_step_was_not_completed (4);
 
  complete_load_step (1);
}
@end
 
@implementation TestClass3
+ load
{
  printf ("[TestClass3 +load]\n");
 
  /* Check superclasses/subclasses +load order.  */
  check_that_load_step_was_completed (0);
  check_that_load_step_was_completed (1);
  check_that_load_step_was_not_completed (2);
 
  /* Check that the corresponding category's +load was not done.  */
  check_that_load_step_was_not_completed (5);
 
  complete_load_step (2);
}
@end
 
@implementation TestClass1
+ initialize { return self; }
+ load
{
  printf ("[TestClass1 +load]\n");
 
  /* Check superclasses/subclasses +load order.  */
  check_that_load_step_was_not_completed (0);
  check_that_load_step_was_not_completed (1);
  check_that_load_step_was_not_completed (2);
 
  /* Check that the corresponding category's +load was not done.  */
  check_that_load_step_was_not_completed (3);
 
  complete_load_step (0);
}
@end
 
 
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.