A toner-amount detection sensor comprising: a board; a sensor cover; a light emitter that is surface-mounted on the board; a light receiver (92, 93) that is surface-mounted on the board; a light-shielding wall that is located between the light emitter and the light receiver (92, 93), abuts the board, and abuts the sensor cover or extends from the sensor cover; and two locking parts that are formed at opposite ends of the sensor cover and press the board to lock it from outside the light emitter and light receiver (92, 93) relative to the light-shielding wall, using the abutment between the light-shielding wall and the board as a supporting point; and two light receivers (92, 93), including the aforementioned light receiver (92, 93), that are surface-mounted on the board and two light-shielding walls, including the aforementioned light-shielding wall, wherein one of the two light-shielding walls is located between the light emitter and the light receiver (92, 93), abuts the board, and abuts the sensor cover or extends from the sensor cover, the other light-shielding wall is located between the two light receivers (92, 93), abuts the board, and abuts the sensor cover or extends from the sensor cover, one of the two light receivers is configured to receive specularly reflected light during operation of the sensor, the other light receiver is configured to receive diffusely reflected light during operation of the sensor, the two locking parts press the board to lock it from outside the light emitter and one of the two light receivers (92, 93) relative to the two light-shielding walls, using the abutments between the two light-shielding walls and the board as supporting points, and the light receiver configured to receive diffusely reflected light is positioned between the light emitter and the light receiver configured to receive specularly reflected light. a board; a sensor cover; a light emitter that is surface-mounted on the board; a light receiver (92, 93) that is surface-mounted on the board; a light-shielding wall that is located between the light emitter and the light receiver (92, 93), abuts the board, and abuts the sensor cover or extends from the sensor cover; and two locking parts that are formed at opposite ends of the sensor cover and press the board to lock it from outside the light emitter and light receiver (92, 93) relative to the light-shielding wall, using the abutment between the light-shielding wall and the board as a supporting point; and two light receivers (92, 93), including the aforementioned light receiver (92, 93), that are surface-mounted on the board and two light-shielding walls, including the aforementioned light-shielding wall, wherein one of the two light-shielding walls is located between the light emitter and the light receiver (92, 93), abuts the board, and abuts the sensor cover or extends from the sensor cover, the other light-shielding wall is located between the two light receivers (92, 93), abuts the board, and abuts the sensor cover or extends from the sensor cover, one of the two light receivers is configured to receive specularly reflected light during operation of the sensor, the other light receiver is configured to receive diffusely reflected light during operation of the sensor, the two locking parts press the board to lock it from outside the light emitter and one of the two light receivers (92, 93) relative to the two light-shielding walls, using the abutments between the two light-shielding walls and the board as supporting points, and the light receiver configured to receive diffusely reflected light is positioned between the light emitter and the light receiver configured to receive specularly reflected light.