rules of section 954(b)(5) (or which would be so properly allocable if such corporation had such gross income). (B) Tested loss The term tested loss means, with respect to any controlled foreign corporation for any taxable year of such controlled foreign corporation, the excess (if any) of the amount described in subparagraph (A)(ii) over the amount described in subparagraph (A)(i). (d) Qualified business asset investment For purposes of this section— (1) In general The term qualified business asset investment means, with respect to any controlled foreign corporation for any taxable year of such controlled foreign corporation, the aggregate of the corporation’s adjusted bases (determined as of the close of such taxable year and after any adjustments with respect to such taxable year) in specified tangible property— (A) used in a trade or business of the corporation, and (B) of a type with respect to which a deduction is allowable under section 168. (2) Specified tangible property The term specified tangible property means any tangible property to the extent such property is used in the production of tested income or tested loss. (3) Partnership property For purposes of this subsection, if a controlled foreign corporation holds an interest in a partnership at the close of such taxable year of the controlled foreign corporation, such controlled foreign corporation shall take into account under paragraph (1) the controlled foreign corporation’s distributive share of the aggregate of the partnership’s adjusted bases (determined as of such date in the hands of the partnership) in tangible property held by such partnership to the extent such property— (A) is used in the trade or business of the partnership, (B) is of a type with respect to which a deduction is allowable under section 168, and (C) is used in the production of tested income or tested loss (determined with respect to such controlled foreign corporation’s distributive share of income or loss with respect to such property). For purposes of this paragraph,