| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 return self.override_shell | 93 return self.override_shell |
| 94 return self.suite.shell() | 94 return self.suite.shell() |
| 95 | 95 |
| 96 def __getstate__(self): | 96 def __getstate__(self): |
| 97 """Representation to pickle test cases. | 97 """Representation to pickle test cases. |
| 98 | 98 |
| 99 The original suite won't be sent beyond process boundaries. Instead | 99 The original suite won't be sent beyond process boundaries. Instead |
| 100 send the name only and retrieve a process-local suite later. | 100 send the name only and retrieve a process-local suite later. |
| 101 """ | 101 """ |
| 102 return dict(self.__dict__, suite=self.suite.name) | 102 return dict(self.__dict__, suite=self.suite.name) |
| 103 |
| 104 def __cmp__(self, other): |
| 105 # Make sure that test cases are sorted correctly if sorted without |
| 106 # key function. But using a key function is preferred for speed. |
| 107 return cmp( |
| 108 (self.suite.name, self.path, self.flags), |
| 109 (other.suite.name, other.path, other.flags), |
| 110 ) |
| OLD | NEW |