Mercurial > octave-nkf
view test/classes/@CPrecedenceTester1/tattack.m @ 16070:e603ce23f20c
Fix and improve functions related to class precedence (bug #38290)
* libinterp/octave-value/ov-class.cc(inferiorto): Use only one call to
set_class_relationship() and properly use the returned value. Rewrite
for clarity (fewer braces, shorter lines).
(superiorto): Rewrite similarly to inferiorto() for clarity.
* libinterp/interpfcn/symtab.cc(symbol_table::set_class_relationship):
Reduce code redundancy using a call to is_superiorto(). Add a comment
to make it clear that a new entry in the precedence table is created
if sup_class is not already there.
(symbol_table::is_superiorto): Rewrite more concisely. Add a comment.
* test/classes/@CPrecedenceTester1, test/classes/@CPrecedenceTester2,
test/classes/@CPrecedenceTester3: New classes for precedence tests.
* test/classes/@Snork/tattack.m: New method for precedence tests.
* test/classes/classes.tst: Add precedence tests.
author | Julien Bect <julien.bect@supelec.fr> |
---|---|
date | Tue, 29 Jan 2013 17:55:53 +0100 |
parents | |
children | b1283d4c06c2 |